I'm running Ubuntu Server 14.04, and I followed these instructions to set up a user account that should be limited to its own home directory. The problem, however, is that FTP access is still allowed for the user account and when the account connects via FTP it has full view access to the entire filesystem. When the user uses SFTP, access is properly limited to the user's home directory. How do I correct this to block FTP access entirely? (Note: SSH access is blocked as it should be. The PuTTY window simply closes when the user tries to log in, no message is displayed or anything.)

Also, I want this user to be able to edit a subdomain on my server (apache2). I have a symlink set up pointing from /home/user/index to /var/www/subdomain, the symlink is owned by the www-data group (of which the user is a member), and the subdomain directory and all files are also owned by www-data, but the user cannot access the symlinked directory via SFTP. How do I make this all work together properly?


I received an answer at the Ubuntu Forums, so I'll post a summary here as well.

Since I have SFTP configured properly, I was advised to remove FTP entirely and only connect via SFTP (this means uninstalling vsftpd entirely, as OpenSSH handles SFTP, not vsftpd). Doing that solved the problem of the whole filesystem being viewable via FTP.

As to the problem of the web server not being accessible, I needed to use mount to mount the directory, rather than using a symlink. mount doesn't survive a server reboot, however, so I edited /etc/fstab to contain /var/www/subdomain /home/user/index none 0 0, and the problem was resolved after a server reboot.

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.