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.

When configuring the user/group that apache runs under, does the process run only with permissions of the specified group, or also with those of which the user is a member?

For example, if Apache runs under apache:apache, and I do usermod -aG somegroup apache, will the Apache processes be able to write to the following file inside my wwwroot?

-r--rw-r--  1 someuser   somegroup       18K Sep 11 14:27 somefile.txt
share|improve this question
    
Keep in mind that you will need to restart the Apache process after modifying the group membership. –  Zoredache Dec 26 '12 at 17:41

1 Answer 1

up vote 1 down vote accepted

Yes, if apache is a member of somegroup, it will have access to any of somegroup's directories and files with permissions as assigned to somegroup. (This system has pitfalls, though. EG. if your wwwroot is NFS mounted, make sure you're not squashing any user IDs.)

share|improve this answer

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.