System Administration Guide: Security Services

UNIX File Permissions

The following table lists and describes the permissions that you can give to each class of user for a file or directory.

Table 6–2 File and Directory Permissions

Symbol 

Permission 

Object 

Description 

r

Read 

File 

Designated users can open and read the contents of a file. 

 

 

Directory 

Designated users can list files in the directory. 

w

Write 

File 

Designated users can modify the contents of the file or delete the file. 

 

 

Directory 

Designated users can add files or add links in the directory. They can also remove files or remove links in the directory. 

x

Execute 

File 

Designated users can execute the file, if it is a program or shell script. They also can run the program with one of the exec(2) system calls.

 

 

Directory 

Designated users can open files or execute files in the directory. They also can make the directory and the directories beneath it current. 

-

Denied 

File and Directory 

Designated users cannot read, write, or execute the file. 

These file permissions apply to regular files, and to special files such as devices, sockets, and named pipes (FIFOs).

For a symbolic link, the permissions that apply are the permissions of the file that the link points to.

You can protect the files in a directory and its subdirectories by setting restrictive file permissions on that directory. Note, however, that superuser has access to all files and directories on the system.