Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Not able to create a folder under '/user' directory from Ambari File View.

Solved Go to solution

Not able to create a folder under '/user' directory from Ambari File View.

Explorer

I am logged into Ambari with 'admin' user.

 

User Directory.png

Then I navigated to File View >> 'user' directory  >> Create a New Folder >> Enter name of folder and click on 'Add' button.

But I am getting a server message: -

 

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

 

How can I provide write permission on user directory to write something or add a folder to it. Request to community to help me. Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Not able to create a folder under '/user' directory from Ambari File View.

Super Mentor

@Bindal 

The "/user" directory permission and ownership is shows as "hdfs:hdfs:drwxr-xr-x"
Which means it can be written only by superuser "hdfs". However in ambari you have logged in as "admin" user which is NOT superuser "hdfs".   So you may have to change the ownership of this dir (Which is not recommended)  so that 'admin' user can create a directory inside it .... 

 


But if you want to perform the directory creation inside "/user" via file view only then you can try this:

1. In Ambari UI Navigate to 

 

 "admin" → "Manage Ambari" → Users → "Add Users" Button

 

2. Create a user with name "hdfs" (you can choose your own desired password for this user and specify in the UI form)

3. You can create this user as Cluster Admin ...etc based on the type needed in the "User Access" section. Similarly you can make that user as Ambari Admin if needed. (But this is up to your requirement)

4. Now give the View Access permission to this user "hdfs"

 

 

"admin" → "Manage Ambari" → Views → "AUTO_FILES_INSTANCE" (click on "edit" button)

 

5. At the end of the "AUTO_FILES_INSTANCE" view definition you will find section named as "Permissions" please add user "hdfs" there.
File_View_Permission.png

6. Now try to login to a freshly opened browser as "hdfs" user and then you should be able to create Folders inside "/user" directory using File View.

.

 

Later you can disable the "hdfs" user account anytime in the Ambari UI.

1 REPLY 1
Highlighted

Re: Not able to create a folder under '/user' directory from Ambari File View.

Super Mentor

@Bindal 

The "/user" directory permission and ownership is shows as "hdfs:hdfs:drwxr-xr-x"
Which means it can be written only by superuser "hdfs". However in ambari you have logged in as "admin" user which is NOT superuser "hdfs".   So you may have to change the ownership of this dir (Which is not recommended)  so that 'admin' user can create a directory inside it .... 

 


But if you want to perform the directory creation inside "/user" via file view only then you can try this:

1. In Ambari UI Navigate to 

 

 "admin" → "Manage Ambari" → Users → "Add Users" Button

 

2. Create a user with name "hdfs" (you can choose your own desired password for this user and specify in the UI form)

3. You can create this user as Cluster Admin ...etc based on the type needed in the "User Access" section. Similarly you can make that user as Ambari Admin if needed. (But this is up to your requirement)

4. Now give the View Access permission to this user "hdfs"

 

 

"admin" → "Manage Ambari" → Views → "AUTO_FILES_INSTANCE" (click on "edit" button)

 

5. At the end of the "AUTO_FILES_INSTANCE" view definition you will find section named as "Permissions" please add user "hdfs" there.
File_View_Permission.png

6. Now try to login to a freshly opened browser as "hdfs" user and then you should be able to create Folders inside "/user" directory using File View.

.

 

Later you can disable the "hdfs" user account anytime in the Ambari UI.

Don't have an account?
Coming from Hortonworks? Activate your account here