Web Hosting Talk







View Full Version : Shell restrictions..??


hypernatic.net
02-13-2002, 05:09 PM
Okay,

Now... I am not very fond of offering people shell access to my servers (mainly RaQ4's)... Why? Well, there are always files that contain passwords and such...

Now I wonder... Is there a way (like with FTP) that you can RESTRICT them from going UP a directory (so if /home/USERNAME is their homedir, that they can't go into /home or up?)....

Thanks guys!!

priyadi
02-13-2002, 05:43 PM
If you restrict shell account to prevent users from getting password then I would say you are not solving the problem. Your user can easily 'browse' the entire filesystem by using cgi scripts, cron jobs, or others. If you don't want your users to access a specific file, then use file permission to restrict it. Hiding it won't solve the problem.

hypernatic.net
02-13-2002, 05:44 PM
I am already trying to do that but I need help on this...

Please post instructions if you have them...

priyadi
02-14-2002, 12:18 AM
Sorry, but there is no specific instruction for this. But if you want to make a file unreadable from your users, you should change its permission using chmod, and probably change its owner or group using chown as well.

Panzerfaust
02-14-2002, 12:34 AM
You will have to make all the directories around the user to be not executable for other users that don't own it, but other applications may have a problem with them. The first problem you're facing is storing passwords on the server that your users are on. That's not good. Hopefully all your passwords are encrypted.

alchiba
02-14-2002, 12:46 AM
I seem to recall Tim Greer posting a long and informative treatise about this very topic (attaboy, Tim!). Sorry I can't be more helpful than that, but you might try searching the forums. Start with this one (Security) and it should turn up.

taivu
02-16-2002, 02:55 AM
Are you referring to this (http://www.webhostingtalk.com/showthread.php?s=&threadid=7847&highlight=safegrp) very informative thread?