?
Solved

Locking certain directories

Posted on 2004-04-07
5
Medium Priority
?
319 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??
0
Comment
Question by:Matthew Tandy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 12

Expert Comment

by:stefan73
ID: 10781388
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
0
 
LVL 9

Expert Comment

by:Alf666
ID: 10783101
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.
0
 
LVL 1

Author Comment

by:Matthew Tandy
ID: 10783372
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
0
 
LVL 9

Accepted Solution

by:
Alf666 earned 800 total points
ID: 10784085
You can do that in chmod, but that will not secure your whole box. vsftpd is very easy to setup, and stands for "very secure ftp server".

It's been made exactly for what you need.

If you want to chmod, the reason why it won't work is that the user the html folder belongs to is different from the one the httpd is configured to use.

If you chmod 700, then, you should chown to whoever is the httpd user (then, 500 might be better, btw).

To find out, just do :

grep "^User" /etc/httpd/httpd.conf
(or wherever your apache config file is).

0
 
LVL 1

Author Comment

by:Matthew Tandy
ID: 10787067
Got it working now, i made the group apache have access, and the user who is the web master, then chmoded it 750

Thanks
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello EE, Today we will learn how to send all your network traffic through Tor which is useful to get around censorship and being tracked all together to a certain degree. This article assumes you will be using Linux, have a minimal knowledge of …
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question