manpagez: man pages & more
info coreutils
Home | html | info | man

File: coreutils.info,  Node: Copying Permissions,  Next: Changing Special Mode Bits,  Prev: Setting Permissions,  Up: Symbolic Modes

27.2.2 Copying Existing Permissions
-----------------------------------

You can base a file’s permissions on its existing permissions.  To do
this, instead of using a series of ‘r’, ‘w’, or ‘x’ letters after the
operator, you use the letter ‘u’, ‘g’, or ‘o’.  For example, the mode

     o+g

adds the permissions for users who are in a file’s group to the
permissions that other users have for the file.  Thus, if the file
started out as mode 664 (‘rw-rw-r--’), the above mode would change it to
mode 666 (‘rw-rw-rw-’).  If the file had started out as mode 741
(‘rwxr----x’), the above mode would change it to mode 745 (‘rwxr--r-x’).
The ‘-’ and ‘=’ operations work analogously.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.