Granting Read Write and Execute The Three Basic Linux Permissions

The foundations of working with permissions in a Linux system are the three elementary permissions: read (r), write (w), and execute (x). Using these permissions is not hard: read allows a user to read the file or the contents of the directory to which the permission is applied, write allows the user to change an existing file if applied to a file and to create or remove files in a directory to which it is applied. Finally, execute on files allows a file to execute executable code. If applied to a directory, it allows a user to activate that directory. Therefore, the execute permission is applied as a default permission to all directories on a Linux system. Table 6-1 summarizes the behavior of the three basic permissions.

Table 6-1. Overview of Linux Basic Permissions

Permission

Applied to Files

Applied to Directories

Read

Reads contents of a file

Lists files in a directory with the ls

command

Write

Modifies existing files and their properties

Creates or deletes files from a

directory

Execute

Executes files that contain executable code

Activates a subdirectory with the cd

command

Was this article helpful?

0 0

Post a comment