# Repository-hdfs with kerberos failed

**URL:** <https://discuss.elastic.co/t/repository-hdfs-with-kerberos-failed/166491>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security, es-hadoop\
**Created:** [January 31, 2019, 8:06am UTC](https://discuss.elastic.co/t/repository-hdfs-with-kerberos-failed/166491 "2019-01-31T08:06:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iQIYI](https://avatars.discourse-cdn.com/v4/letter/i/bcef8e/32.png) [@iQIYI](https://discuss.elastic.co/u/iQIYI)\
**Post date:** [January 31, 2019, 8:06am UTC](https://discuss.elastic.co/t/repository-hdfs-with-kerberos-failed/166491/1 "2019-01-31T08:06:22Z")

</div>

Hi, I want to create a secure repository-hdfs with kerberos.

- Place the keytab file in `/etc/elasticsearch/repository-hdfs/krb5.keytab`
- Edit the realm info in `/etc/krb5.conf`

After done the above two steps, I can use `kinit` and `klist` get the correct message. So I create my repo in kibana console:

"""  
PUT \_snapshot/my\_hdfs\_repository  
{  
"type": "hdfs",  
"settings": {  
"uri": "hdfs://10.149.164.225:8020",  
"path": "/data/nta/repositories/my\_hdfs\_repository",  
"security.principal": "sys\_cq@HADOOP.XXXX.COM"  
}  
}  
"""

But I get the error log:

"""  
Permission denied: user=sys\_cq, access=WRITE, inode="/":hdfs:hadoop:drwxr-xr-x  
"""

I have the right permissions in HDFS:  
"""  
$ hadoop fs -ls -d /data/nta  
drwxr-x--- - sys\_cq sys\_cq  
"""

My software version is:  
"""  
elasticsearch Version: 6.5.3, Build: default/rpm/159a78a/2018-12-06T20:11:28.826501Z, JVM: 1.8.0\_201  
hadoop version: Hadoop 2.6.0-cdh5.11.0  
"""

Can anybody help me ? 🙂

---

<div class="post-metadata">

**Author:** ![james.baiera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james.baiera/32/10209_2.png) [@james.baiera](https://discuss.elastic.co/u/james.baiera)\
**Post date:** [February 11, 2019, 9:36pm UTC](https://discuss.elastic.co/t/repository-hdfs-with-kerberos-failed/166491/2 "2019-02-11T21:36:07Z")

</div>

Could you increase the logging level in Elasticsearch for the `org.elasticsearch.repositories.hdfs` package to `DEBUG` and post the full logs here?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 11, 2019, 9:36pm UTC](https://discuss.elastic.co/t/repository-hdfs-with-kerberos-failed/166491/3 "2019-03-11T21:36:09Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
