Is it possible to recursively copy the permissions of owner to group and others for all files in a given directory?
PS: my chmod
is 5.97
Is it possible to recursively copy the permissions of owner to group and others for all files in a given directory?
PS: my chmod
is 5.97
Yes, you can do this by using symbolic notation in chmod
:
chmod -R go=u /path/to/directory
Typically the mode specifiers following the operator consists of a combination of the letters rwxXst
, each of which signifies the corresponding mode bit. However, the mode specifier may also consist of one of the letters ugo
, in which case case the mode corresponds to the permissions currently granted to the owner (u
), member's of the file's group (g
) or permissions of users in neither of the preceding categories (o
).