Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-08-2005, 02:02 PM   #1
Registered: Mar 2005
Posts: 141

Rep: Reputation: 15
Can I prevent users from seeing dir contents?

Is there a way that I can prevent other users from seeing outsider directories?

For example if I have the following


Is there a way I can prevent userb from being able to change to /home/usera ? If not is there a way at least I can prevent userb from being able to any of the file contents in /home/usera/ ?
Old 04-08-2005, 02:06 PM   #2
Registered: Mar 2005
Location: somewhere over the rainbow theres a place....
Distribution: Ubuntu Dapper and Arch
Posts: 121

Rep: Reputation: 15
I believe you need to use chmod

Old 04-08-2005, 03:41 PM   #3
Senior Member
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 13.37 Android 4.0
Posts: 2,248

Rep: Reputation: 46
Yep, just change permissions to allow only the owner of that directory to view it.
Old 04-08-2005, 04:22 PM   #4
Registered: Sep 2004
Location: south texas
Distribution: fedora core 3,4; gentoo
Posts: 192

Rep: Reputation: 30
the command to do that could be

chmod 700 /home/usera

which you would have to run as user a or root
Old 04-08-2005, 05:07 PM   #5
Registered: Mar 2005
Posts: 141

Original Poster
Rep: Reputation: 15
Thanks for the response all. I ended up doing it with chmod o= /home/usera

Is chmod 700 /home/usera the numerical equivilant?
Old 04-08-2005, 08:56 PM   #6
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,265

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
No, you'd need go= to get the equivalent of numeric 0700.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash script to compare dir contents Boffy Programming 2 08-02-2005 07:08 AM
Apache 2.0, I want to list dir contents & password protect... Scrag Linux - Software 3 02-10-2005 12:38 PM
index.php to list the contents of the dir?? bruno buys Linux - Software 1 08-30-2004 03:19 AM
d/l contents of a dir hfawzy Linux - General 2 05-08-2003 01:58 PM
auto rename contents of a DIR bkeating Linux - General 1 11-05-2002 07:34 PM

All times are GMT -5. The time now is 06:46 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration