1

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
ahmad
  • 13
  • 2

1 Answers1

1

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.)

dafydd
  • 395
  • 2
  • 3
  • 10