34
8
I was asked to add group-wrx permissions to a directory in another user's home folder.
I believe what I should do is run chmod 771 -R directoryname
in the parent directory. What I can't find anywhere on the tubes is how to specify which group I want to give these permissions to. I'm personally in a number of groups, and in a bunch I don't know about as root.
In case it matters, the system is running Redhat 5.4.
1
If you use +X (capital X) you will only add execute (or 'search') permission if the file is a directory or already had execute permission for some user. http://linux.die.net/man/1/chmod
– Dave – 2016-04-06T18:03:59.673@Dave:
– Jonathan Leffler – 2016-04-06T18:17:41.353chmod +X
is supported on BSD (Mac OS X) too, it seems. Careful scrutiny of POSIXchmod
indicates that+X
is a POSIX feature after all: The perm symbol X shall represent the execute/search portion of the file mode bits if the file is a directory or if the current (unmodified) file mode bits have at least one of the execute bits (S_IXUSR, S_IXGRP, or S_IXOTH) set. It shall be ignored if the file is not a directory and none of the execute bits are set in the current file mode bits. Note the Rationale below.