coreutils: Multiple Changes

1 
1 27.2.5 Making Multiple Changes
1 ------------------------------
1 
1 The format of symbolic modes is actually more complex than described
1 above (⇒Setting Permissions).  It provides two ways to make
1 multiple changes to files’ mode bits.
1 
1    The first way is to specify multiple OPERATION and PERMISSIONS parts
1 after a USERS part in the symbolic mode.
1 
1    For example, the mode:
1 
1      og+rX-w
1 
1 gives users other than the owner of the file read permission and, if it
1 is a directory or if someone already had execute permission to it, gives
1 them execute/search permission; and it also denies them write permission
1 to the file.  It does not affect the permission that the owner of the
1 file has for it.  The above mode is equivalent to the two modes:
1 
1      og+rX
1      og-w
1 
1    The second way to make multiple changes is to specify more than one
1 simple symbolic mode, separated by commas.  For example, the mode:
1 
1      a+r,go-w
1 
1 gives everyone permission to read the file and removes write permission
1 on it for all users except its owner.  Another example:
1 
1      u=rwx,g=rx,o=
1 
1 sets all of the permission bits for the file explicitly.  (It gives
1 users who are not in the file’s group no permission at all for it.)
1 
1    The two methods can be combined.  The mode:
1 
1      a+r,g+x-w
1 
1 gives all users permission to read the file, and gives users who are in
1 the file’s group permission to execute/search it as well, but not
1 permission to write to it.  The above mode could be written in several
1 different ways; another is:
1 
1      u+r,g+rx,o+r,g-w
1