Centos – Adding the apache user to the default group doesn’t give apache group access

apache-2.2centosgroupspermissions

The whole Linux user:group topic just gives me headaches again.

Situation

I have my document roots (httpdocs) and everything inside chown-ed to a certain user and a certain group, let's say myuser:mygroup.

chown -R myuser:mygroup httpdocs

Now apache doesn't have access to let's say a public images folder. So I add apache to mygroup, for example with:

usermod -a -G mygroup apache

Question

Any file or folder which I chmod to 775 should now give apache write permission, not?
Doesn't happen… do I have to reload, restart or else reinitiate something for this to happen or do I still just not get the whole thing.

Best Answer

Did you restart apache after making the change? The groups will only be enumerated for the apache account when apache server is restarted.

Related Topic