Running Apache under multiple groups

Let's say I have the following three directories:

Code:
drwxrwxr-x   4 root     groupa     512 Oct 1 11:00 dira
drwxrwxr-x   2 root     groupb     512 Oct 1 11:00 dirb
drwxrwxr-x   2 root     groupc     512 Oct 1 11:00 dirc

and httpd is run as the user 'apacheuser' and the group 'apachegroup' and is a member of 'groupa' 'groupb' and 'groupc.' My goal is for Apache to be able to write to all three directories, but it does not seem to be able to because it only recognizes the group membership of 'apachegroup.' Is there a way to accomplish this? Thanks!
 
I think he is doing setuid and setgid, so additional groups from /etc/groups are discarded..
Only way i see here - is make directories like this
Code:
drwxrwxr-x   4 usera  apachegroup   512 Oct 1 11:00 dira
drwxrwxr-x   2 userb   apachegroup  512 Oct 1 11:00 dirb
drwxrwxr-x   2 userc   apachegroup  512 Oct 1 11:00 dirc
 
Alt said:
I think he is doing setuid and setgid, so additional groups from /etc/groups are discarded..
Only way i see here - is make directories like this
Code:
drwxrwxr-x   4 usera  apachegroup   512 Oct 1 11:00 dira
drwxrwxr-x   2 userb   apachegroup  512 Oct 1 11:00 dirb
drwxrwxr-x   2 userc   apachegroup  512 Oct 1 11:00 dirc

The user and group is set in httpd.conf as 'User apacheuser' and 'Group apachegroup.' Thanks for the suggestion, but each directory needs to be owned by a different group.
 
Back
Top