Зміст курсу
Linux Basics
Linux Basics
Setting Permissions
In this section, we will explore the process of configuring access rights in Linux, providing you with the necessary knowledge for effectively controlling who has access to your information. From understanding basic concepts to practical examples of access rights configuration, this section will help you ensure the security of your system and data.
In Ubuntu, individual users, groups, and other users have default access permissions. Here are some key details:
- File Owner: Has all access rights: read, write, and execute (
rwx
); - File Group: Typically has read and write permissions (
rw
); - Other Users: Have only the right to read (
r
).
These permissions can be modified using the chmod
command.
Explanation of Parameters
The command chmod u=rw,g=r,o=- myfile.txt
sets the following permissions for the file myfile.txt
:
- The user (owner) gets read and write permissions (
rw
); - The group gets read permission (
r
); - Others have no access (
-
).
This command strictly limits access to the myfile.txt
file, allowing only the owner to read and write to it, while allowing the group to read and denying access to all other users.
Дякуємо за ваш відгук!