

r-x: are the permissions for the Group user class. If you count the characters here, you will find every one of these codes has 10 characters.Įach group of 3 characters represents the permissions of a user class.ĭ: indicates that this is a directory rwx: are the permissions for the Owner. Now let’s analyze these two examples to understand what they mean. These are the permissions for each of the directories and files that are listed to the right.ĭon’t worry, they are pretty easy to understand even though they might look intimidating at first. Right now we’ll focus on the text on the left, drwxr-xr-x or -rw-r-r- in lines 3 and 4 respectively. You can also see the permissions of a specific file using: ls -l filename.extensionĪfter running the ls -l command, you will see something like this: : ~/Desktop# ls -l Use the ls -l command to list the files, directories, and their permissions: ls -l Let’s see how we can view the permissions of a file or a folder. Now that you know the user and permission types, an example will help you understand the whole picture. Execution permission: It allows a user to execute the file.Write permission: This permission allows a user to modify the file.Read permission: A user can read files with this permission.This user class is often called World.Īny files or folders can have three different kinds of permissions associated with them – Others: Any user outside the Group and the Owner.Owner: This is the user who created the file/folder.There are 3 separate user classes on Linux, who could use a file in different ways. Recursively change permissions of all files within a directoryīefore we move on to the methods to change the permissions, you need to have some basic ideas of how the file/folder permissions work on Linux.
