Super User is a question and answer site for computer enthusiasts and power users. 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

I'm a novice with Linux/Unix. Basically I'm attempting to setup a Web server, and FTP server on a Linux box via SSH.

My plan is to have Apache's root folder inside the main user account like


and have an ftp-user account which should have rw- access via FTP to /home/giuseppe/www/public_html

I'm still not able to have the ftp-user being able to access the public_html directory in the home folder of the other account.

When I connect via FTP using the ftp-user, it defaults to its home directory.

These are the steps I have taken so far:

  • I have installed vsftpd and edited /etc/vsftpd/vsftpd.config ports and so on so that I'm able to connect with the ftp-user account. I've also set the local_root=/home/giuseppe/www/public_html/

  • I have restarted the vsftpd service after any config changes.

  • I have added a group named developers

  • I have made ftp-user member of developers, so that id ftp-user gives:

    uid=500(ftp-user) gid=502(developers) groups=502(developers)

  • I've changed the group of public_html with chgrp developers /home/giuseppe/www/public_html/

However, every time I connect via FTP the ftp-user account has rw- access to its own home folder only.

As I test I have added a symlink ln -s /home/giuseppe/www/public_html /home/ftp-user/. While I can see the symlink in the ftp-user home directory, I'm not able to navigate through the public_html symlink. Here is Filezilla's status log when I double click the symlink:

Status: Retrieving directory listing...
Command:    CWD /home/ftp-user
Response:   250 Directory successfully changed.
Command:    CWD public_html
Response:   550 Failed to change directory.
Error:  Failed to retrieve directory listing
Status: Starting download of /home/ftp-user/public_html
Command:    PASV
Response:   227 Entering Passive Mode (XXX,XXX,XXX,XXX,4,14).
Command:    RETR public_html
Response:   550 Failed to open file.
Error:  Critical error

Is my planned setup sensible or would you setup things differently?

share|improve this question
I suppose it would be safe to assume that you chmod'd the directory, but it would be nice to see what permissions the folder has with an ls -l. – digitxp Aug 27 '11 at 0:01
Yes I did give group permission and ls -l would have given drwxrwx--- 5 giuseppe developers 4096 Aug 27 01:30 public_html – Giuseppe Romagnuolo Aug 27 '11 at 12:08
Since the post I have changed my plan and eventually got things working. I have chroot() in vsftpd.config, then I have mounted the ftp-user home directory to the /home/giuseppe/www/public_html. I have then also mounted the /var/www/html to /home/giuseppe/www/public_html. Then I have made apache user and apache group drwxrwx of /home/giuseppe/www/public_html, and finally added ftp-user to the apache group. This seems to work, I've got hints from Apache docs where it mentions using mountpoints. – Giuseppe Romagnuolo Aug 27 '11 at 12:27

Your Answer


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

Browse other questions tagged or ask your own question.