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


Default permissions set by the system

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

When you first create a file or directory, the system sets default read, write, and execute (rwx) permissions. The meanings of the three permissions differ somewhat for a file and a directory:

Permission Notation Meaning
read r Directory: Permission to read, but not search, contents.

File: Permission to read or print contents. To run a shell script, you need both read and execute permission.

write w Directory: Permission to change the directory, adding or deleting members.

File: Permission to change the file, adding or deleting data

execute x Directory: Permission to search a directory. Usually r and x are used together.

File: Permission to run a file—that is, enter it as a command. Typically this permission is used for shell scripts and for files containing executable programs. (To run a shell script, you need read and execute permission.)

The following table shows the default permissions set by the system:
Using To create a Default permissions
mkdir shell command Directory
  • owner=rwx
  • group=rwx
  • other=rwx
In octal form: 777
MKDIR TSO command Directory
  • owner=rwx
  • group=r-x
  • other=r-x
In octal form: 755
JCL with no PATHMODE specified Directory or file
  • owner=---
  • group=---
  • other=---
In octal form: 000
ISPF editor, OEDIT command, oedit command File
  • owner=rwx
  • group=---
  • other=---
In octal form: 700
vi editor File
  • owner=rw-
  • group=rw-
  • other=rw-
In octal form: 666
ed editor File
  • owner=rw-
  • group=rw-
  • other=rw-
In octal form: 666
Redirection (>) File
  • owner=rw-
  • group=rw-
  • other=rw-
In octal form: 666
cp command File Sets the output file permissions to the input file permissions.
OCOPY command File Permission bits for a new file are specified with the ALLOCATE command, using the PATHMODE keyword, prior to entering the OCOPY command. If the PATHMODE keyword is omitted, the default is:
  • owner=---
  • group=---
  • other=---
In octal form: 000
OPUT or OPUTX command File For a text file:
  • owner=rw-
  • group=---
  • other=---
In octal form: 600
For a binary file:
  • owner=rwx
  • group=---
  • other=---
In octal form: 700
For more information on octal numbers, see Using octal numbers to specify permissions.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014