tags:
- article
- linux
- software
- operating-system
source: https://linuxhandbook.com/linux-file-permissions/
created: 2024-10-16
published: 2023-10-05
What two factors determine what files and directories user can access in Linux?
The two factors that determine what files and directories a user can access in Linux are:
What are the three types of owners in Linux?
The three types of owners in Linux are:
What are the three different file permissions available for all three types of owners?
The three different file permissions available for all three types of owners are:
What are the three different directory permissions available for all three types of owners?
The three different directory permissions available for all three types of owners are:
Does an owner need execute permissions in order to write to a directory?
Yes, an owner needs execute permissions in order to write to a directory.
What two commands can you use to see the permissions of a file or directory?
Two commands you can use to see the permissions of a file or directory are:
stat
.ls -l
.What is the format of the output of the ls -l
command?
The format of the output of the ls -l
command is:
What are the possible file type indicators?
The possible file type indicators are:
d
- Directory.-
- Regular file.l
- Symbolic link.In what units is the file size?
The file size is in bytes.What are the meanings letters mean in the permissions section?
In the permissions section, the meanings of the letters are:
r
- Read permission.w
- Write permission.x
- Execute permission.-
- No permission set.For which user do the first three letters of the permissions section refer to?
The first three letters of the permissions section refer to the user owner.For which user do the middle three letters of the permissions section refer to?
The middle three letters of the permissions section refer to other users in the same group as the user owner.For which user do the last three letters of the permissions section refer to?
The last three letters of the permissions section refer to all other users on the system.
What can the root user do normally to all files regardless of permissions?
Regardless of permissions, the root user can normally read, write, and execute all files.
If a user belongs to multiple groups, to which group do the group permissions for a file created by the user apply?
If a user belongs to multiple groups, the group permissions for a file created by the user apply to the primary group of the user.
How do you find the primary group of a user?
To find the primary group of a user, runid -gn <username>
.
Which program is used to change the permissions for a file or directory in Linux?
In Linux, the program used to change the permissions for a file or directory is chmod
.
Why is the program called
chmod
?
The program is calledchmod
because the original name for permissions on Linux was "mode of access," and sochmod
was short for "change mode of access."
What are the two modes you can use chmod
?
The two modes you can use chmod
are:
chmod
in absolute modeHow are file permissions represented in absolute mode?
In absolute mode, permissions are represented as octal numbers.
What are the numbers that represent each permission?
The numbers that represent each permission are:
What is the table for all the possible combinations of permissions in absolute mode?
The table for all the possible combinations of permissions in absolute mode is:
Number | Permission |
---|---|
0 | --- |
1 | --x |
2 | -w- |
3 | -wx |
4 | r-- |
5 | r-x |
6 | rw- |
7 | rwx |
...