z/OS UNIX System Services User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using a symbolic mode to specify permissions

z/OS UNIX System Services User's Guide
SA23-2279-00

A symbolic mode has the form:
[who] op permission [op permission …]
The who value is optional; it can be any combination of the following:
u
Sets owner (user) permissions.
g
Sets group permissions.
o
Sets other permissions.
a
Sets all permissions; this is the default.
The op part of a symbolic mode is an operator that tells chmod to turn the permissions on or off. The possible values are:
+
Turns on a permission.
Turns off a permission.
=
Turns on the specified permissions and turns off all others.
To set the permission part of a symbolic mode, you can specify any combination of the following permissions in any order:
r
Read permission.
s
This stands for set-user-ID-on-execution or set-group-ID-on-execution permission. See Temporarily changing the user ID or group ID during execution for more information.
t
This sets the sticky bit on, for a file or directory.
Directory: The sticky bit is set on for a directory so that a user cannot remove or rename a file in the directory unless one or more of these conditions is true:
  • The user owns the file.
  • The user owns the directory.
  • The user has superuser authority.

File: The sticky bit is set for frequently used programs in the file system, to reduce I/O and improve performance. When the bit is set on, z/OS UNIX searches for the program in the user's STEPLIB, the link pack area, or the link list concatenation. For information on copying a load module from the file system into a data set, see Copying an executable module from the file system. See Verifying that the sticky bit is on in z/OS UNIX System Services Planning for information on using the sticky bit with daemons.

w
Write permission. If this is off, you cannot write to the file.
x
Execute permission. If this is off, you cannot execute the file.
X
Search permission for a directory; or execute permission for a file only when the current mode has at least one of the execute bits set.
For example, to turn on read, write, and execute permissions, and turn off the set-user-ID and sticky bit attributes for a file, enter the command:
chmod a=rwx file

You can specify multiple symbolic modes if you separate them with commas.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014