Friday, July 18, 2008

chmod-Change Access Permissions of a File or Directory

Synopsis
chmod [ -fR] mode pathname ...
Description
chmod changes the access permissions or made of the specified files or directories.Modes determine who can read, change or execute a file.
Options
the -R option can be used when a directory is specified on the command line. chmod will give all subdirectories and files under that directory the attributes specified for the directory itself.
the -f option forces chmod to return a succesful status and no error messages, even if errors are encountered.this is useful if you're using -R to change a lot of files but you don't really care if chmod changes everything, provided that it change a particular subset of the files.
Modes
The mode value on the command line can be spesified in symbolic form or as an octal value.
A symbolic mode has the form
[who] op permission [op permission ...]
the who value can be any combination of the following:
u sets user (individual) permissions
g sets group permissions
o sets other permissions
a sets all permissions;this is the default
On DOS, there are no group or other permissions. therefore, they always match the individual permissions.
the op part of a symbolic mode is an operator telling whether permissions ahould be turned on or off


No comments: