2

I asked this a little bit ago, but instead of specifying Pure-FTPD I just said Apache. Per the answer to that question, I'm asking again with "Pure-FTPD" in the title this time.

I need to allow someone access to my VPS via FTP, but there are a number of directories that the person must not be allowed to view or modify. For example, something like this:

private_info_1
public_info_1
private_info_2
public_info_2

In this example, the FTP user would need to be allowed to do stuff in the public directories, but not the private ones.

How do I go about doing this with Pure-FTPD? I have cPanel and SSH access.

  • Just curious, how is apache relevant to the question? I am referring to the apache2 tag and the "apache server running pure-ftpd" statement. – chutz Dec 9 '12 at 23:56
  • @chutz - I guess nothing? I removed the apache tag. – Nate Dec 10 '12 at 1:02
1
+50

If you use PureDB users, you could use the -d homedirectory option to chroot user to his home directory on account :

pure-pw useradd myuser -u ftpuser -g ftpgroup -d /home/ftp/myuser

To provide access to specific folders (often seen for webservers), use symlinks.

www -> /srv/www/myuser

[UPDATE] Misread the post about jailing user.

You could either create another virtual user/group which would restrain filesystem access, although I'm not sure it would be safest thing to do (some people with better experience than me could answer).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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