Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a user named "ftp3" that belong to group "ftpusers-temp".

The home of that user is home/FTP-shared/temp

In proftpd.conf I have the following 2 directives:

DefaultRoot /home/FTP-shared
DefaultRoot ~ ftpusers-temp

I was expecting that user ftp3 could see only the "temp" directory; but what happens is that the "temp" directory is selected by default upon login, but the user can go back and access the root of the ftp server.

Shouln't user "ftp3" be jailed in "/home/FTP-shared/temp", and unable to access "/home/FTP-shared"?

share|improve this question
add comment

2 Answers

I believe the problem could be that you have multiple DefaultRoot(s) specified. As the ProFTPd documentation explains:

If two DefaultRoot directives apply to the same user, ProFTPD arbitrarily chooses one (based on how the configuration file was parsed)

You could try commenting out the first DefaultRoot directive and see if that helps to resolve the problem.

share|improve this answer
add comment

edit

This is a method of jailing users in their own home directory.

  • This is an standard function in ProFTPd
  • Open /etc/proftpd/proftpd.conf
  • Uncomment #DefaultRoot ~
  • replace with DefaultRoot /home/someuser someuser

(Let’s quickly explain the line above. DefaultRoot is the parameter used by proftpd to enable the jail functionality. someuser is the primary group of all users being chrooted (by default this is the same as the username). /home/someuser is the directory where the user will be jailed.)

  • Then execute "/etc/init.d/proftpd restart"
share|improve this answer
    
Thanks for the answer, but I've already tried that and didn't work. –  pvieira Jun 23 '10 at 8:51
add comment

Your Answer

 
discard

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.