The meaning of the permissions is different for files and folders. Write permission, represented by the " w" letter.Įxecution permission, repersented by the " x" letter. Read permission, represented by the " r" letter. In Linux, the permission management that the users and the groups of users have on the files and folders is carried out using a simple scheme of three types of permission: We will focus on the first field (file permissions). Let's start with the fields permission, user, and group. The output of the command ls -l indicates whether it is a file (-) or directory (d), the permissions of the file/directory (rw-rw-r-), the following field (indicates the number of files/directories) user and group to which it belongs (parrot hackers), size (0), last modification date (Oct 16 12:32) and name (file.txt and scripts). rw-rw-r- 1 parrot hackers 0 oct 16 12:32 archive.txtĭrwxr-xr-x 3 parrot hackers 4096 oct 15 16:25 scripts Let's analyze the output of the command ls -l # ls -l archive.txt
For this reason, we often use the sudo command to be able to read, modify or execute files and programs of the system or make changes in the permissions of the files in question.
If this user creates a file, it belongs to the parrot user and the default group of the parrot user. For example, in the other chapters, we worked with a user account simply called user. The owner of a file is the user who created it and the main group of this file is that of the user who created it. With GNU/Linux, all the files of the system belong to a user and a group.