Permissions in Linux are designed to keep users from accessing other users’ private files and to protect important system files. They are managed in three classes:
- user – determines what the file’s owner can do with the file.
- group – determines what the members of the file’s group can do with the file.
- others (world) – determines what everyone else on the Linux system can do with the file.
There are three specific permissions in Linux:
- read – grants the ability to read a file. When set for a directory, users are allowed to list the directory’s content.
- write – grants the ability to modify a file. When set for a directory, users are allowed to add or remove files in the directory.
- execute – grants the ability to execute a file. When set for a directory, users are allowed to access file contents and metainfo if its name is known, but not to list files inside the directory (unless the read permission is set).
You assign read, write or execute permission to each of the class of users. For example, you can give the owner of the file full permissions (read, write and execute) over the file, give the group read and write permissions and deny any type of access to the others class.