1

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.

0

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. – tarek fellah Dec 4 '15 at 20:46
  • no. It is immediate. How? – Jakuje Dec 4 '15 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. – tarek fellah Dec 5 '15 at 10:54

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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