Skip to content
Step by Step Internet 馃寪 Guides for learning to surf the Net

Permissions and Owners in Linux What are they, what are they for and how to modify them in the operating system?

As well as Windows and MacOS, Linux is another of the most used operating systems worldwide. Which consists of software that allows you to use programs such as editors of text, Internet browsers, games, etc. Thus, it is characterized by being a multi-user and multi-tasking system which provides an interface of commands and a graphical interface.

However, as it is a system designed mainly for work in net, the security of the information that each user stores on their computers and servers is essential. Taking into account that many people will have access to part of the software and hardware resources that are managed through computers.

As a consequence, in Linux there are elements known as “User rights or permissions” that are directed to certain files contained in the machines and, for this, they are established in three differentiated levels, among which are owner permissions. To learn more what they are about and how they can be modified, we invite you to read this post.

What are permissions and owners in the Linux operating system?

Generally speaking, a permit consists of an authorization that it is obtained or granted to carry out a certain process. Therefore, permissions and owners in Linux are defined as a set of privileges that are granted based on who can read, modify or execute a system specific file.

Now, the owner is the user who creates or produces a file or folder within your working directory or in some other directory to which you have rights. So, from owner’s permissions system, each person will have the power to create the files they want within their working directory, by default, on linux.

For its part, to be clear about these concepts, it should be noted that, in networked systems, there is always the figure of the administrator or superuser. Said individual, is responsible for registering or deleting other users and it even takes care of establishing the privileges that each of them will have in the system. One such privilege is the owner permissions.

What is the role of permissions and owners in this OS?

To know the role of permissions and owners in Linux, it should be noted that, Each file in this OS is identified by 10 characters that define the type of file it is., like the permissions that are granted to the owner, respectively.

However, at a global level, three types of permissions are the most managed and, below, we mention what they are and what their specific nature is:

Now, knowing the types of permits that are handled in Linux, it’s possible define what function they fulfill and / or what they are for.

This information, we mention it below:

File permissions

  • Read permissions: Provides the ability to view the content of the file, solely and exclusively.
  • Write permissions: Allows you to change or modify the content of the file in question.
  • Execution permissions: As the term itself indicates, they allow you to run the file as if it were executable software.

Directory permissions

  • Read permissions: It is useful to know which files contains the directory that has this privilege.
  • Write permissions: These permissions work to support the creation of files in the directory, both new and ordinary. You can even move, copy and delete files in the directory.
  • Execution permissions: Allows you to browse all the contents of the directory, as well as copy files to or from it. In the event that read and write permissions are also obtained, in addition, all possible operations can be carried out on the directories and files.

Learn how to modify permissions and owners in Linux

Learn how to modify permissions and owners in Linux

Although it is true, to be able to change permissions and owners of files or folders in the systems Linux / Unix, it is necessary to have access to the commands. Taking into account that, there are two exclusive commands that you can use to perform this task, but we will only focus on “Chmod”.

Next, we show you the steps to follow to make this modification:

Notice the syntax of the Linux chmod command

Basically the chmod It’s about a command used to change permissions of a archive or binder.

Considering that, each file has three types of users that can interact with it and they are the following:

Now, there is a specific formula to correctly use the command chmod.

Next, we detail what the precise syntax is:

  • chmod [Opción]… MODE[,MODO]… ARCHIVE…
  • chmod [Opción]… FILE OCTAL-MODE…

Form an octal number

Now the combination of values ​​of each group of users, you will have to form a number octal. From this foundation, the combination of bits on or off in each group can be obtained, especially with eight possible combinations of values.

For example, the probable sums of the lit bits are:

Set file or directory permissions

Having the above information, when the permissions of the user, group and others are combined, you can get a three-digit number which, basically, are what make up the file / directory permissions.

This way: