Read permission (r)
File has only R permissions: Read \ Read file content permissions
1. Only use the View Class command cat, Head, tail, less, more
2. Cannot copy, that is, cannot use CP command
3. Cannot move, cannot move with MV command
4. Cannot edit, cannot write content using vim or Eho command
5. Can not delete, delete the permissions to see the parent directory, not to see the current file
Directory has only R permissions: has browse directories and subdirectory permissions
1. Can use the LS command to browse directories and subdirectories, but also prompt permission to deny
2. Can use the LS-L command to browse directories and subdirectories, with a question mark, and only see the file name
Summary: The directory only R permissions, only browse within the file name, no other operational permissions
3. Cannot enter directory, must cooperate with X permission to have CD command to enter directory permission
Write Permission (W)
If the file has only W permissions: Has new, modified file content permissions
1. Use Vim to edit, will prompt permission to deny, but can be forced to save, will overwrite the previous file contents
2. Use the echo command to redirect or append redirection technology to write data to a file
3. Use the cat command to read the file and send the output of the read file to the input of the W permission file only
4. Cannot copy, (copy need to see the upper directory of the W permission)
5. Can not move, (mobile needs to see the upper directory W permissions)
6. Can not delete, (delete need to see the parent directory W permissions)
If the directory has only W permissions: Has add, delete, or modify file name permissions in the directory (requires x mates)
Note: Deleting and moving files is independent of the properties of the file itself
1. Cannot enter directory
2. Cannot copy directory
3. Cannot delete directory
4. Cannot move directory
Execute permissions (x)
The file has only X permissions and has permission to execute the file.
Note: The normal user needs to have R permission, the administrator does not need
1. Unable to execute file
2. Cannot view file
3. Cannot write files
4. Cannot copy files
5. Cannot move file
6. Cannot delete files
Directory has only X permissions
1. Access to the catalogue
2. Cannot browse directory
3. Cannot copy directory
4. Cannot move directory
5. Cannot delete directory
Read Permissions + Write permission (rw)
File RW Permissions
1. Can view the contents of the file
2. Can edit file contents
Read Permissions + Execute permissions (RX)
The file has only RX permissions
1. Ability to execute files
2. Ability to view files
3. Cannot edit file
4. Cannot copy files
5. Cannot move file
6. Cannot delete files
The directory has only RX permissions
1. Allow browsing in directory files and subdirectories
2. Allow new files within the directory
3. Do not allow directory creation
4. Deleting files or directories is not allowed
Write permissions + Execute permissions (WX)
File only WX Permissions
Directory only WX permissions
1. can enter, directory
2. Can create, can create files or directories
3. Can view, must know the file name or directory name (the parent directory needs to have W permission)
4. Can copy, must know the file name or directory name (the parent directory should have W permission)
5. Can move, must know the file name or directory name (the parent directory should have W permission)
6. Can delete, must know the file name or directory name (the parent directory needs to have W permission)
7. Cannot browse directories or directories under subdirectories
Linux file directory permissions comparison