Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 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.

share|improve this answer

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

share|improve this answer
    
no I didn't... so there must be another way to cause the enumeration... –  markus Mar 1 '11 at 20:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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