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
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:
op specifies the operation to be performed, as follows: