Manual Pages
Table of Contents
cifs chmod - change the permissions mode of a file
cifs chmod share mode path
Sets or changes the UNIX-style permission mode of a file or
directory within a share. This command permits an administrator
connected to the filer from a DOS or Windows machine
to change the permissions that govern access for UNIX
clients. The administrator could achieve the same effect by
using the NetApp Permission Tool ntapperm (downloadable from
NOW) from a Windows machine.
The cifs chmod command sets the permissions of the file or
directory with the pathname path, relative to the root
directory of the share share, to the mode specified by mode.
The permission mode may be written either in absolute or in
symbolic format, as follows.
Absolute Mode
A mode specified in absolute format is an octal number. The
full range of options is represented by a number having four
octal digits. However, the high-order digit is no longer
used in most situations, so a 3-digit number (with an
implied leading 0) suffices. Within this octal number, the
significance of digits in the various positions is the same
as in UNIX systems. In each position, the value shown is
the sum of the values for the permissions that are granted.
Position
3 2 1 0
Value At Exec'n Owner Group Others
4 Set-user-ID Read Read Read
2 Set-group-ID Write Write Write
1 Sticky bit Execute Execute Execute
- or search
- or search or search
directory directory directory
For example, consider the value 751. To the owner, it gives
read-write-execute permission. To a member of the group, it
gives read-execute permission. To a user who is neither the
owner nor a member of the group, it gives read permission.
Since 751 lacks a leading fourth digit, no permission is
given for set-user-ID, set-group-ID, or sticky bit.
Applied to a directory, permission to execute means permission
to list or search the directory.
Symbolic Format for a Permission Mode
In symbolic format, a mode is written as a comma-separated
list of operations in which item in the list has the form
[ who ] op [ permission ]
who specifies which of the user, group, and other parts of
the mode bits are to be changed; it is a list that can contain
the letters ``u'', ``g'', and ``o'', specifying the
user, group, and other parts of the mode bits, respectively,
or the letter ``a'' for ``all'', equivalent to ``ugo''. If
who is omitted, it is equivalent to ``a''.
perm specifies the mode bit values, as follows:
- r
- Read.
- w
- Write.
- x
- Execute/search directory.
- s
- Set-user-ID-on-execution and set-group-ID-onexecution.
- t
- Sticky bit.
If perm is omitted, it specifies none of the mode bits.
op specifies the operation to be performed, as follows:
- +
- In general, adds the permissions represented by
the specified values of who and perm. That is,
permissions not mentioned are left unchanged.
However, if no value is supplied for who, the
permission specified in perm is applied to the
attributes enabled in the creation mask. If no
value is supplied for perm, the ``+'' operation
has no effect.
- -
- In general, withdraws the permissions
represented by the specified values of perm
from the class of users specified by who. If
who is omitted, the withdrawal applies to all.
If perm is omitted, the ``-'' operation has no
effect.
- =
- In general, sets the permissions represented by
the specified values of who and perm. Omiting
who has the same effect as specifying ``a''
(all). Omitting perm has the same effect as
withdrawing all permissions, and is thus
equivalent to -rwxst.
Permission ``s'' is not valid with users ``o'', and permission
``t'' is not valid with users ``u'' or ``g''. These
combinations are ignored but don't invalidate other parts of
the command.
- 644
- makes a file readable by anyone and writable
by the owner only.
- go-w
- denies write permission to group and others.
755
- u=rwx,go=rx
- make a file readable/executable by everyone
and writable by the owner only.
- go=
- denies all permissions for group and others,
and is thus equivalent to go-rwxst.
Table of Contents