MAN page from RedHat Other fileutils-3.16-2.i386.rpm
CHMOD
Section: User Commands (1)
Updated: GNU File Utilities
Index NAME
chmod - change the access permissions of files
SYNOPSIS
chmod[-Rcfv] [--recursive] [--changes][--silent] [--quiet] [--verbose] [--help] [--version] mode file...
DESCRIPTION
This documentation is no longer being maintained and may be inaccurateor incomplete. The Texinfo documentation is now the authoritative source.
This manual pagedocuments the GNU version ofchmod.chmodchanges the permissions of each given file according tomode,which can be either a symbolic representation of changes to make, oran octal number representing the bit pattern for the new permissions.
The format of a symbolic mode is`[ugoa...][[+-=][rwxXstugo...]...][,...]'. Multiple symbolicoperations can be given, separated by commas.
A combination of the letters `ugoa' controls which users' access tothe file will be changed: the user who owns it (u), other users in thefile's group (g), other users not in the file's group (o), or allusers (a). If none of these are given, the effect is as if `a' weregiven, but bits that are set in the umask are not affected.
The operator `+' causes the permissions selected to be added to theexisting permissions of each file; `-' causes them to be removed; and`=' causes them to be the only permissions that the file has.
The letters `rwxXstugo' select the new permissions for the affectedusers: read (r), write (w), execute (or access for directories) (x),execute only if the file is a directory or already has executepermission for some user (X), set user or group ID on execution (s),save program text on swap device (t), the permissions that the userwho owns the file currently has for it (u), the permissions that otherusers in the file's group have for it (g), and the permissions thatother users not in the file's group have for it (o).
A numeric mode is from one to four octal digits (0-7), derived byadding up the bits with values 4, 2, and 1. Any omitted digits areassumed to be leading zeros. The first digit selects the set user ID(4) and set group ID (2) and save text image (1) attributes. Thesecond digit selects permissions for the user who owns the file: read(4), write (2), and execute (1); the third selects permissions forother users in the file's group, with the same values; and the fourthfor other users not in the file's group, with the same values.
chmodnever changes the permissions of symbolic links; thechmodsystem call cannot change their permissions. This is not a problemsince the permissions of symbolic links are never used.However, for each symbolic link listed on the command line,chmodchanges the permissions of the pointed-to file.In contrast,chmodignores symbolic links encountered during recursive directorytraversals.
OPTIONS
- -c, --changes
- Verbosely describe only files whose permissions actually change.
- -f, --silent, --quiet
- Do not print error messages about files whose permissions cannot bechanged.
- -v, --verbose
- Verbosely describe changed permissions.
- -R, --recursive
- Recursively change permissions of directories and their contents.
- --help
- Print a usage message on standard output and exit successfully.
- --version
- Print version information on standard output then exit successfully.
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
This document was created byman2html,using the manual pages.