
c
chmod(1) | chmod(1) |
NAME
chmod - change ®le mode access permissions
SYNOPSIS
/usr/bin/chmod
Obsolescent form:
/usr/bin/chmod
DESCRIPTION
The chmod command changes the permissions of one or more ®les according to the value of symbolic_mode_list or numeric_mode. You can display the current permissions for a ®le with the ls
Symbolic Mode List
Asymbolic_mode_list is a
[who]op[permission] [,...]
The variable ®elds can have the following values:
who | One or more of the following letters: |
uModify permissions for user (owner). g Modify permissions for group.
o Modify permissions for others.
a Modify permissions for all users (a is equivalent to ugo).
op | Required; one of the following symbols: |
+Add permission to the existing ®le mode bits of who.
-Delete permission from the existing ®le mode bits of who. = Replace the existing mode bits of who with permission.
permission One or more of the following letters:
rAdd or delete the read permission for who.
wAdd or delete the write permission for who.
xAdd or delete the execute ®le (search directory) permission for who.
sAdd or delete the
tAdd or delete the
XConditionally add or delete the execute/search permission as follows:
∙If ®le is a directory, add or delete the search permission to the existing ®le mode for who. (Same as x.)
∙If ®le is not a directory, and the current ®le permissions include the execute permission (ls
∙If ®le is not a directory, and no execute permissions are set in the current ®le mode, then do not change any execute permission.
Or one only of the following letters:
uCopy the current user permissions to who. g Copy the current group permissions to who. o Copy the current other permissions to who.
The operations are performed in the order speci®ed, and can override preceding operations speci®ed in the same command line.
If who is omitted, the r, w, x, and X permissions are changed for all users if the changes are permitted by the current ®le mode creation mask (see umask(1)). The s and t permissions are changed as if a was speci®ed in who.
Omitting permission is useful only when used with = to delete all permissions.
Section 1−84 | − 1 − |