How to add additional groups for apache users?

Linode Staff

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

1 Reply

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

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct