I have installed Webmin on an Ubuntu Server where I host multiple websites. I create a new virtual host and new user for every website I host. My process is:
- Create a new user for the website
- SSH with that user and create a www folder (I think this is wrong?)
- Create a Virtual Host for the website
- Point the DNS to the server
Doing this allows the user to create files/folders and seems to serve the websites fine. I do however have problems with some frameworks/cms with permissions. eg wordpress cannot install plugins, I have to copy them manually. This leads me to beleive my permissions are not setup correctly.
Alternatively, I can skip #2 and let webmin/apache create the root www folder, which gives it the group/user www-data. But this prevents my created user from creating files.
I would like to know how can I modify my steps in order to allow the www folder (and subsequent files/folders) to have the correct permissions.