Results 1 to 8 of 8
I'm trying to figure out how to disable a user from viewing others' files in SSH & FTP. I'm running Redhat Linux 9, and by default,a user once is logged ...
- 01-25-2006 #1Just Joined!
- Join Date
- Jan 2006
- Posts
- 6
Disable Users From Viewing Others' Files
I'm trying to figure out how to disable a user from viewing others' files in SSH & FTP. I'm running Redhat Linux 9, and by default,a user once is logged in (via FTP or SSH), he/she is able to view files in other user accounts and other system files.
Anyone knows a good article on this issue or having any tip?
Thanks in advance.
Edit: sorry, seems that I posted in wrong forum, pls move to appropriate forum.
- 01-25-2006 #2
I think you can set the permissions of directories or files so certain users can't view them. Not completely sure though. Google permissions in redhat and you'll find an answer.
- 01-25-2006 #3Just Joined!
- Join Date
- Jan 2006
- Posts
- 6
Thanks for the tip, but I already tried that. If I set group with no read and execute permission, the user's site ain't viewable to others in the LAN.
- 01-25-2006 #4Linux Enthusiast
- Join Date
- Apr 2004
- Location
- UK
- Posts
- 658
If you set the users home directory permissions to 0701 then other people will be able to cd into the directory but not list anything. Then chmod the users public_html directory to 0755. People (and the web server) will then be able to cd into their ~/public_html directory so they will show up on the website.
If getting into other users public_html directories is a problem, you might be able to set the group of the users public_html directory to a group the webserver user is in and then set the permissions of the public folder so only the owner and group have access.
You may need to do some configuration on the webserver to make that work though.Code:chown <user>.web ~/public_html chmod 750 ~/public_html
Let us know how you get on
Chris...To be good, you must first be bad. "Newbie" is a rank, not a slight.
- 01-25-2006 #5It might be as simple as making sure that the user the web server runs as (apache or httpd usually) is added to the group for each user. The user's group can then easily be given read but not write access to the home (and the public_html) directories.
Originally Posted by kakariko81280 Linux user #126863 - see http://linuxcounter.net/
- 01-25-2006 #6Linux Newbie
- Join Date
- Nov 2004
- Posts
- 239
What ftp server are you using? most have an option to chroot the users who log in - this means they cannot leave there own home directory...
not sure how to do this with ssh, but i am sure it is possible..
- 01-26-2006 #7Just Joined!
- Join Date
- Jan 2006
- Posts
- 6
I'm using ProFTP. I don't know if anyone heard of jail-shell, as in cPanel, users can't leave their own directory, but I don't know if there's any script has this same feature.
- 01-26-2006 #8Just Joined!
- Join Date
- Jan 2006
- Posts
- 6
Got this figured out. Thanks all for the help.


Reply With Quote
