Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I make such thing, to give no visibility to user except only one directory (especially within FTP)?

I should give some sample scenario: Someone logs to my server with some username and password and that person cannot affect my file system except that directory.

There is proftpd and apache2 installed on the server. How can I do that thing, I wonder?

share|improve this question
up vote 2 down vote accepted

With ProFtpd you can use the DefaultRoot directive to chroot users into their home directory tree. In your proftpd.conf set

DefaultRoot  ~ 

to lock all users. There is more discussion in the link above and here too.

share|improve this answer
Works perfectly. Thanks! – Christoph Jun 9 '11 at 16:00

You need a chroot jail.

Here is how you can achieve this if using vsftp.

You might also want to consider using publicfile instead.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.