I have standard Ubuntu 16.04 droplet over digitalocean with LAMP stack. By default I have one user with root privileges (for admin use). I access any directory from root through ssh like with filezilla or netbeans. It all works fine as it should upto this.

I need more users created so that I can configure them to be able to access a particular vhost directory say like /var/www/html/domain2.com or probably only /var/www/html/*

Also I need to be sure that doing so will not affect any Apache related permissions on folders and files. Say if I create a folder say uploads from user1 and www-data user cant read or write into that folder uploads.

How can I do this ?

marked as duplicate by Jenny D, Andrew Schulman, Ward, kubanczyk, Pothi Kalimuthu Apr 9 '18 at 1:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


You could mount the directory they need to access with bindfs in their home directory

ex : bindfs -u user1 -g user1 --create-for-user=www-data --create-for-group=www-data /home/user1/www/ var/www/html/domain2.com

  • Thanks looks good enough. I will give this a try tomorrow and will update you. – Sudarshan Anbazhagan Apr 3 '18 at 12:24

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