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 1-2 File and Directory Permissions
Symbol | Permission | Object | Description |
---|---|---|---|
|
Read |
File |
Designated users can open and read the contents of a file. |
|
Read |
Directory |
Designated users can list files in the directory. |
|
Write |
File |
Designated users can modify the contents of the file or delete the file. |
|
Write |
Directory |
Designated users can add files or add links in the directory. They can also remove files or remove links in the directory. |
|
Execute |
File |
Designated users can execute the file, if it is a program or shell script. They also can execute the program with one of the |
|
Execute |
Directory |
Designated users can open files or run 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 the root
role has access to all files and directories on the system.