2

After I set the permission to have both groups added to different user I am still not able to change the permission for directory and files.

id adminOne
uid=495(adminOne) gid=492(apps) groups=492(apps),5002(shared)

id adminTwo
uid=7376(adminTwo) gid=5002(shared) groups=5002(shared),492(apps)

If I log in with adminOne I changed a shared folder such as test...

adminOne@UnixEB: chmod -R 777 test
chmod: changing permissions of `test': Operation not permitted

adminOne@UnixEB: ll
drwxrwx--- 7 adminTwo shared 4096 Nov 30 11:40 test

why I cannot change the permission when I already set the owner to both groups?

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
logger
  • 181

1 Answers1

1

I mentioned this in a comment above, but it's worth calling out again. Having write permissions does not give a non-owner the right to modify the permissions of a file – only the owner (or root) can change a file's permissions.

You may be able to use ACLs to enable what you're after; see: https://unix.stackexchange.com/a/75915/90691

Andy Dalton
  • 13,993