Link to home
Start Free TrialLog in
Avatar of Matthew Tandy
Matthew TandyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Locking certain directories

I am running a website, where i would like to give people FTP access, when the user ftps in they start in

/home/%username%

if they wander to /var/www/html they can access all the html thats stored on the site. I dont want them to be able to access these folders, is there anything i can do??
Avatar of stefan73
stefan73
Flag of Germany image

Use chroot. There are plenty of nice step-by-step explanations on the web for this, just search for "chroot jail".

Here are some examples:
http://www.kegel.com/crosstool/current/doc/chroot-login-howto.html
http://www.geniusweb.com/LDP/HOWTO/Chroot-BIND8-HOWTO.html
Avatar of Alf666
Alf666

Just use an ftp server that makes all this right away for you : vsftpd.

http://vsftpd.beasts.org/

You can find RPMs for most distros.
Avatar of Matthew Tandy

ASKER

Im sure ive done it before with just chmod though, however this time if i chmod the html folder or any others below to 700 it wont let the site work
ASKER CERTIFIED SOLUTION
Avatar of Alf666
Alf666

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Got it working now, i made the group apache have access, and the user who is the web master, then chmoded it 750

Thanks