[CentOS] Apache: User and Group

Tue Jan 29 16:37:20 UTC 2008
Jim Perrin <jperrin at gmail.com>

On Jan 29, 2008 11:25 AM, Niki Kovacs <contact at kikinovak.net> wrote:

> As far as I understand, I have to chown all my web content accordingly,
> so that everything below /var/www/html belongs to apache:apache. Right?

You can, but but I would only recommend doing that where the webserver
itself will be responsible for changing files.

If apache owns everything in that directory, then it can modify them.
This can potentially be undesirable. Depending on what you're doing,
you'll have to mix and match permissions as needed. Mostly apache just
needs to be able to read stuff, so having root own it with 644 is
fine. If you're using a CMS which allows folks to edit things via the
webserver, then those will have to be owned by apache, or apache will
otherwise need rights to modify them. Have I made that muddled and
complex enough?



-- 
During times of universal deceit, telling the truth becomes a revolutionary act.
George Orwell