LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-08-2005, 01:02 PM   #1
Jukas
Member
 
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

/home/usera
/home/userb

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, 01:06 PM   #2
calcon
Member
 
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

calcon
 
Old 04-08-2005, 02:41 PM   #3
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 -current
Posts: 2,300

Rep: Reputation: 90
Yep, just change permissions to allow only the owner of that directory to view it.
 
Old 04-08-2005, 03:22 PM   #4
sirclif
Member
 
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, 04:07 PM   #5
Jukas
Member
 
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, 07:56 PM   #6
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

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


Reply



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 06:08 AM
Apache 2.0, I want to list dir contents & password protect... Scrag Linux - Software 3 02-10-2005 11:38 AM
index.php to list the contents of the dir?? bruno buys Linux - Software 1 08-30-2004 02:19 AM
d/l contents of a dir hfawzy Linux - General 2 05-08-2003 12:58 PM
auto rename contents of a DIR bkeating Linux - General 1 11-05-2002 06:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:35 PM.

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