chmod -- change permissions of files.
chmod [-R [-H | -L | -P]] mode file [files ...]
chmod sets the permissions of files. The first argument after the options is permission the files should be given.
chmod accepts the options described below. The options -L, -H and -P are mutally exclusive, and only the last given option will be honoured. All of -L, -H and -P require the -R option to be set first.
Modes are either absolute, or symbolic. An absolute mode is an octal number, calculated by OR-ing the following values:
Suid on execution.
Guid on execution.
The sticky(8) bit is turned on.
Read permission for the ownwer of the file.
Write permission for the ownwer of the file.
Execute permission for the ownwer of the file.
Read permission for those in the group as the group of the file.
Write permission for those in the group as the group of the file.
Execute permission for those in the group as the group of the file.
Read permission for all others.
Write permission for all others.
Execute permission for all others.
Symbolic mode is a comma separated list of actions. Each action has the following format:
[who] operator [permissions] [operator [permissions] ...]
who consists of zero or more of the following symbols:
If who is omitted, it will default to a, but the value of your umask is taken into account. chmod will then not set a permission that is masked by your umask.
The operator is one of:
permission consists of zero or more of:
The working of chmod is not influenced by any environment variables.
It is unlikely there are no bugs. The documentation is at best ambiguous. The OpenBSD documentation does not match the OpenBSD implementation. Furthermore, the implementations of Solaris, SunOS, HP, and GNU all differ from each other, and from OpenBSD.
This manual page needs work. The module SymbolicMode needs to be documented.
chmod parses a symbolic mode once for each file. That is too much redundant work.
chmod can loop forever when symbolic links create cycles.
chmod uses File::Find to recurse.
This manual should have been written in Texinfo, LaTeX, or a funky SGML application. pod2man, pod2html, pod2text and pod2latex are all broken beyond belief.
It does not make sense to talk about standards in a chmod manual page.
$Log: chmod.abigail.html,v $
Revision 1.3 2004/08/05 14:18:01 cwest
cleanup, new version number on website
Revision 1.1 2004/07/23 20:10:01 cwest
initial import
Revision 1.3 1999/03/09 02:44:57 abigail
Fixed SybolicMode -> SymbolicMode typo.
Revision 1.2 1999/03/08 03:07:28 abigail
Major documentation tweaks.
Revision 1.1 1999/03/07 12:03:54 abigail
Initial revision
AUTHOR
The Perl implementation of chmod was written by Abigail, abigail@fnx.com.
COPYRIGHT and LICENSE
This program is copyright by Abigail 1999.
This program is free and open software. You may use, copy, modify, distribute, and sell this program (and any modified variants) in any way you wish, provided you do not restrict others from doing the same.