I am using webmin to install apache and run Wordpress, and i am getting some permission errors. Here is what I have done so far:
I have installed webmin apache, it is running under the user:group apache:apache.
I then created a new user, newuser, which is running under the user:group newuser:newuser.
I created a new webmin virtual directory with:
- server name: newdomain.com
- document root: /home/newuser/www
- alternative virtual server names: www.newuser.com
All files within the /home/newuser/www directory are chowned to newuser:newuser
I installed WordPress which runs, however when running WordPress i am getting errors uploading files, such as
error: The uploaded file could not be moved to wp-content/uploads.
If I chown the users files to apache:apache, it works. However, the user then cannot edit files in their home directory which are owned by apache.
I have seen on cPanel apache runs as the user for the site which is being accessed (i.e. all files in the directory are user:user, as opposed to apache:apache).
How can i achieve the same with webmin, specifically allowing apache to run, but users being able to upload and edit files in their directory?