Académique Documents
Professionnel Documents
Culture Documents
chmod(1) chmod(1)
NAME
chmod - change file mode access permissions
SYNOPSIS
/usr/bin/chmod [-A] [-R] symbolic_mode_list file ...
Obsolescent form:
/usr/bin/chmod [-A] [-R] numeric_mode file ...
DESCRIPTION
The chmod command changes the permissions of one or more files
according to the value of symbolic_mode_list or numeric_mode. You can
display the current permissions for a file with the ls -l command (see
ls(1)).
[who]op[permission][,...]
chmod(1) chmod(1)
The operations are performed in the order specified, and can override
preceding operations specified in the same command line.
chmod(1) chmod(1)
Options
-A Preserve any optional access control list (ACL) entries
associated with the file. By default, in conformance with
the IEEE Standard POSIX 1003.1-1988, optional ACL entries
are deleted. For information about access control lists,
see acl(5).
In order to set the set-group-ID bit, the group of the file must
correspond to your current group ID.
EXTERNAL INFLUENCES
Environment Variables
LC_MESSAGES determines the language in which messages are displayed.
RETURN VALUE
Upon completion, chmod returns one of the following values:
chmod(1) chmod(1)
0 Successful completion.
>0 An error condition occurred.
EXAMPLES
Deny write permission to others:
Assign read and execute permission to everybody, and set the set-
user-ID bit:
chmod a=rx,u+s file
Assign read and write permission to the file owner, and read
permission to everybody else:
chmod +w mytest
chmod -w mytest
chmod(1) chmod(1)
DEPENDENCIES
The -A option causes chmod to fail on file systems that do not support
ACLs.
AUTHOR
chmod was developed by AT&T and HP.
SEE ALSO
chacl(1), ls(1), umask(1), chmod(2), acl(5).
STANDARDS CONFORMANCE
chmod: SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2