-2

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 ?

1 Answers1

1

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

MickaelCa
  • 96
  • 1
  • 1
  • 3