0
votes

I have webmin installed where I create new virtual hosts and new users to manage those sites.

My process is:

  1. Create a new user. (/home/nameofuser/)
  2. SSH in as the new user, and create a webroot folder (/home/nameofuser/www/)
  3. Create a virtual host pointed to that webroot (home/nameofuser/www/)

The problem with this is that the apache www-data user is not the owner of the files. However, if I let webmin create the webroot for me, the user/group becomes www-data:www-data but the new user is unable to create files/folders.

An example of why this is an issue is when I try to install wordpress, it is unable to install plugins or create files such as log files.

How should I set the permissions on and/or within my webroot folder

1

1 Answers

1
votes

In the above scenario the easiest would be to add all users that need access to the folders/files that Webmin created to the www-data group, you may have to give the User directories 664. That should solve access issues, but if the list of users grows so does access to the webroot. A true solution for vhosts and multiple users is apache2-mpm-itk This is a much better solution but requires a little reading.