3

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.

4

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

  • no I didn't... so there must be another way to cause the enumeration... – markus Mar 1 '11 at 20:31
2

Well, I just realized that it works as I described it. Don't know why the lag, maybe I just didn't properly refresh the browser or maybe CentOS reads the group file after every X minutes or who knows. But the scenario as I described it, works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.