I have a VPS OS: ubuntu 15.04, in which i have one website in /var/www/html/WEBSITE /var/www/html/WEBSITE have www-data:www-data as user:group

I created a symbolic link with

ls -s /var/www/html/WEBSITE /home/USER1/WEBSITE

To allow access USER1 to /var/www/html/WEBSITE with sftp I have created a user USER1 with this command

sudo useradd -d /home/user1 -m User1 -g sftp -s /bin/false

/home/USER1/WEBSITE root:root

I would like to give to securely access to USER1 to folder /var/www/html/WEBSITE I followed this link, so connection will be with sftp.

When i connect with root acount on sftp with filezilla, the symbolic link is redirected me the /var/www/html/WEBSITE but when i'm connected with USER1 account i couldn't access to the target folder.

Thanks and sorry for my english.

1 Answer 1


You need to make sure that the User1/USER1 (or however you named it) has the access to the real directory /var/www/html/WEBSITE, not only to the symlink.

This is usually made by defining a new group for that user and apache/www-data and allowing the the access for this group. The rights should depend on what the user should be able to do there. But for the start, reading something about Unix Permission is good start

  • I changed file/folder owner to USERS1:sftp but still have problem accessing folder/files with user USER1, it should take time to be effective? Thanks. Dec 4, 2015 at 20:46
  • no. It is immediate. How?
    – Jakuje
    Dec 4, 2015 at 20:48
  • I retested and it's working when i changed my website folder owner to USER1 my problem now is that the user have acess to all directories how to restrict its access to only its home folder? Thanks. Dec 5, 2015 at 10:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .