Support Questions
Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

Ambari users permissions file view

Expert Contributor

Hi,

So I log in to Ambari as admin, then I try to add a folder in files view:

Permission denied: user=admin, access=WRITE, inode="/ml-in-a-nutshell":hdfs:hdfs:drwxr-xr-x

I am accessing Ambari via Chrome under another user, 'ed'.

So should I be logging into Ambari as hdfs? Or maybe changing admin permissions?

But if I login as hdfs then will it see my existing cluster and what would be the passowrd?

This user thing is quite confusing.

1 ACCEPTED SOLUTION

Super Mentor

@ed day

As we see that the write access is there only for the "hdfs" user on the directory "/ml-in-a-nutshell"

So if you want to write in that directory as "ed" user then the "ed" user should have write permission on that mentioned HDFS directory.

Example: So try changing the permission as followong:

# su - hdfs -c "hdfs dfs -chown ed:hadoop  /ml-in-a-nutshell

.

Or else you will need to use the "hdfs dfs -chmod" command to allow write access to the "ed" user on the mentioned directory.

.

Similarly if you want the "admin" user to be able to access to write in that directory then you will need to change th permissions of that HDFS directory as mentioned above.

.

View solution in original post

6 REPLIES 6

Super Mentor

@ed day

As we see that the write access is there only for the "hdfs" user on the directory "/ml-in-a-nutshell"

So if you want to write in that directory as "ed" user then the "ed" user should have write permission on that mentioned HDFS directory.

Example: So try changing the permission as followong:

# su - hdfs -c "hdfs dfs -chown ed:hadoop  /ml-in-a-nutshell

.

Or else you will need to use the "hdfs dfs -chmod" command to allow write access to the "ed" user on the mentioned directory.

.

Similarly if you want the "admin" user to be able to access to write in that directory then you will need to change th permissions of that HDFS directory as mentioned above.

.

Expert Contributor

Thanks Jay, but I was trying to add the folder, not write into it. I was adding it to the root folder /.

Super Mentor

@ed day

The HDFS root directory allows only the hdfs:hdfs (username:groupname) user to write on "/"

Please check the permission to know who can write in the ROOT (/) directory of hdfs file system.

#  su - hdfs -c "hdfs dfs -ls -d /"
drwxr-xr-x   - hdfs hdfs          0 2017-06-21 09:59 /

.

In order to create a directory "Write" permission is needed to the user.

So if you want to create the directory inside "/" then you should create the directory as hdfs user and then you can use chown and chmod commands properly to give read/write/execute access on this directory to your desired users.

.

Expert Contributor

I cretaed the folder under /user/admin for which I have permissions. Makes sense I suppose.

Super Mentor

@ed day

Good to see your resolved your query.

However your Exception that is mentioned in the query is different. And your Accepted answer does not really answers query/exception that was asked.

Regarding admin user directory "/user/admin" please refer to the Hortonworks Documentation, Which will help other users to know why do we need to create "/user/admin" directory and assign permission to it as "admin:hadoop"

https://docs.hortonworks.com/HDPDocuments/Ambari-2.4.0.0/bk_ambari-views/content/ch_using_falcon_vie...

Expert Contributor

Yes fair enough. Your answer now accepted, thanks for your help.