We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Locking certain directories

Matthew Tandy
on
Medium Priority
355 Views
Last Modified: 2010-04-22
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??
Comment
Watch Question

Top Expert 2004

Commented:
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

Commented:
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.
Matthew TandyTechnical Architect

Author

Commented:
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
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Matthew TandyTechnical Architect

Author

Commented:
Got it working now, i made the group apache have access, and the user who is the web master, then chmoded it 750

Thanks
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.