Solved

Locking certain directories

Posted on 2004-04-07
5
309 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 200 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

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…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

717 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