Say I have a folder called folder
in the following path:
my_path = /a/b/c/d/e/folder
and a file called file
in that folder.
Then, say I run this command to remove group permissions under /a/
> chmod g-rwx -R /a/
Now, say I give +rx
permissions to folder
:
> chmod g+rx /a/b/c/d/e/folder
Then, if a second user in my group runs:
> ls /a/b/c/d/e/folder
or
> cat /a/b/c/d/e/folder/file
she gets permission errors, and as far as I understand this is because I need to provide g+x
access to to all the parents of folder
. My question then is, when or why would it ever be useful to give +x
permission to a directory whose parent does not have it?
Thanks
chmod +grx -R /a/b/c/d/e/folder
? It's wrong, the right way to execute it is:chmod g+rx -R /a/b/c/d/e/folder