Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

Directory read permission setting does not work

avatar
Expert Contributor

I use chmod to give others the read permission on the home/maria_dev directory. However, the user hive still cannot read the directory.

[maria_dev@sandbox-hdp ~]$ ls -ld
drwx---r-- 1 maria_dev maria_dev 4096 Mar  5 05:35 .
[maria_dev@sandbox-hdp ~]$ sudo su hive
[hive@sandbox-hdp maria_dev]$ ls
ls: cannot open directory .: Permission denied


1 ACCEPTED SOLUTION

avatar
Expert Contributor

You must provide read and execute (r-x) permissions to others.


Try this

$ chmod 705 /home/maria_dev
$ sudo su hive

$ ls -l /home/maria_dev

View solution in original post

4 REPLIES 4

avatar
Master Mentor

@Haijin Li

I think there is a problem with your command the - (hyphen) is missing can you copy and paste the below

$ sudo su - hive 

Please revert

avatar
Expert Contributor

@Geoffrey Shelton Okot

My intention is to use "su hive", not "su - hive".

Below is the resource showing the difference.

https://www.tecmint.com/difference-between-su-and-su-commands-in-linux/

Thanks.

avatar
Expert Contributor

You must provide read and execute (r-x) permissions to others.


Try this

$ chmod 705 /home/maria_dev
$ sudo su hive

$ ls -l /home/maria_dev

avatar
Expert Contributor

@Gulshad Ansari

Thanks. You are right. The execute permission is required for entering the directory.