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


Positions 2, 3, and 4

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

Specifying these bits is required. For each type of access—owner, group, and other—there is a corresponding octal number:
0
No access (---)
1
Execute-only access (--x)
2
Write-only access (-w-)
3
Write and execute access (-wx)
4
Read-only access (r--)
5
Read and execute access (r-x)
6
Read and write access (rw-)
7
Read, write, and execute access (rwx)

To specify permissions for a file or directory, you use at least a three-digit octal number, omitting the digit in the first position. When you specify three digits instead of four, the first digit describes owner permissions, the second digit describes group permissions, and the third digit describes permissions for all others.

If you are not setting the first octal digit, you can just specify 3 digits instead of 4. When the first digit is not set, some typical 3-digit permissions are specified in octal this way:

Table 1. Three-digit permissions specified in octal
Octal number       Meaning
666  
      6   6   6
     /    |    \
   rw-   rw-   rw-
 
  • owner (rw-)
  • group (rw-)
  • other (rw-)
700  
      7   0   0
     /    |    \
   rwx   ---   ---
 
  • owner (rwx)
  • group (---)
  • other (---)
755  
      7   5   5
     /    |    \
   rwx   r-x   r-x
 
  • owner (rwx)
  • group (r-x)
  • other (r-x)
777  
      7   7   7
     /    |    \
   rwx   rwx   rwx
 
  • owner (rwx)
  • group (rwx)
  • other (rwx)

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014