I'm trying to add Apache and a user called admin
to the same group on CentOS.
When I run id admin
I get groups 1000 (apache) and group 1002 (admin), when I run id apache
I get groups 1000 (apache) and 1003 (access).
I see that they're both members of the 1000 group (apache), but when I try to add admin to the 1003 (access) group as well via usermod -G access admin
, it deletes admin from the apache group for some reason (so then when I run 'id admin' I get groups 1002 and 1003, but it is not listed as part of 1000 anymore).
Is there like a limitation of the number of groups a user can be a member of? If not, how do I put them in the same group?
My problem is due to permissions issues - in a specific folder, which is owned by 'admin', for instance, when I try to create a new directory or upload a file with the admin user I am able to do so. However, when I try to do that using the apache user I can't.
Edit: Output for getfacl:
getfacl: Removing leading '/' from absolute path names
# file: home/admin/domains/xxx/public_html/xxx/xxx
# owner: apache
# group: apache
user::rwx
user:apache:rwx
group::rwx
mask::rwx
other::r-x
default:user::rwx
default:user:apache:rwx
default:group::rwx
default:mask::rwx
default:other::r-x
14th of April edit:
getfacl: Removing leading '/' from absolute path names
# file: home/admin/domains/public_html/xxx/xxx
# owner: apache
# group: apache
user::rwx
user:admin:rwx
group::rwx
mask::rwx
other::r-x
default:user::rwx
default:user:admin:rwx
default:group::rwx
default:mask::rwx
default:other::r-x