On my laptop for testing, I simply chown each subdir of /var/www to my myuser:www-data. But, now that I am setting up a public facing server, I'm wondering if this is the proper way to do so? If not, what is the best way to allow a non-root account to write to /var/www.
| |||
|
feedback
|
|
In general, I would chown the directories to I wouldn't have them with Another option is to leave | |||
|
feedback
|
|
I would keep the default ownership and permissions and use Posix ACLs to give write permission to the users who need it. The man page | |||||
feedback
|
|
Generally speaking, I do something similar to what you do. If it's a single user that needs access, I chown /var/www/htdocs to that user and be done with it. If Multiple users need access remotely, I would suggest using a wiki, or wordpress, or some other CMS that will manage access permissions for you. The best way to do this really does vary depending on what your use case is. If you could be more clear about what you are doing with it and what you need. You'll get a better answer on how to properly configure it. | |||
feedback
|
|
You should probably be setting up the site as a virtualhost, and then you can use /srv/sites/yourdomain.com/ as the or whatever as the docroot. then, make a yourdomain group, or just call it 'webadmin' or something, and add your users to that group. | |||
|
feedback
|