Linux files are setup so access to them is controlled. There are three types of access:
- read
- write
- execute
Each file belongs to a specific user and group. Access to the files is controlled by user, group, and what is called other. The term, other, is used to refer to someone who is not the user (owner) of the file, nor is the person a member of the group the file belongs to.When talking about setting permissions for "other" users to use, it is commonly referred to as setting the world execute, read, or write bit since anyone in the world will be able to perform the operation if the permission is set in the other category.
File names can be up to 256 characters long with "-", "_", and "." characters along with letters and numbers.
When a long file listing is done, there are 10 characters that are shown on the left that indicate type and permissions of the file. File permissions are shown according to the following syntax example: drwerwerwe
There are a total of 10 characters in this example, as in all Linux files. The first character indicates the type of file, and the next three indicate read, write, and execute permission for each of the three user types, user, group and other. Since there are three types of permission for three users, there are a total of nine permission bits. The table below shows the syntax:
File names can be up to 256 characters long with "-", "_", and "." characters along with letters and numbers.
When a long file listing is done, there are 10 characters that are shown on the left that indicate type and permissions of the file. File permissions are shown according to the following syntax example: drwerwerwe
There are a total of 10 characters in this example, as in all Linux files. The first character indicates the type of file, and the next three indicate read, write, and execute permission for each of the three user types, user, group and other. Since there are three types of permission for three users, there are a total of nine permission bits. The table below shows the syntax:
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
File | User Permissions | Group Permissions | Other Permissions | ||||||
Type | Read | Write | Execute | Read | Write | Execute | Read | Write | Execute |
d | r | w | e | r | w | e | r | w | e |
Character 1 is the type of file: - is ordinary, d is directory, l is link.
Characters 2-4 show owner permissions.2=indicates read permission,
3=indicates write permission, 4=indicates execute permission.
Characters 5-7 show group permissions. 5=read, 6=write, 7=execute
Characters 8-10 show permissions for all other users.
8=read, 9=write, 10=execute
There are 5 possible characters in the permission fields. They are:
- r = read - This is only found in the read field.
- w = write - This is only found in the write field.
- x = execute - This is only found in the execute field.
- s = setuid - This is only found in the execute field.
- If there is a "-" in a particular location, there is no permission. This may be found in any field whether read, write, or execute field
No comments:
Post a Comment