Permission are used in Linux for files, directories and programs. If you have ever used any Linux operating system like ubuntu, knoppix, fedora, etc. then you may have seen this letters “drwrx-xr-x”, “-rw-r—r-x” associated with the files and directories.
Linux offers strong tool to user regarding files. Each file has some type of permission with it. This help us to prevent the unauthorized access to our files without our permission.
Permission are used to restrict the USER ACCESS. Suppose we want to provide a user with READ only rights without WRITE and EXECUTE rights, then we will assign “r–“ permission to the files. This will allow anyone to read or view the content of the files without write and execute permission.
Here are the types of permission which are allowed in Linux—
Write (w)
It will allow user to edit the file or directories. User can modify, create or remove the files or subdirectories.
Read ( r)
Grants user the Read only capabilities. User can view or read the content of the file without making any changes to it.
Execute (x)
This permission is assigned those files which perform some actions like a program. It allows the user to “run” or “execute” the program like Mozilla, Games,etc.
- (No permission)
It means no permission, files don’t have read, write or execute. User can’t view the file conetent. User can’t modify a file. User can’t execute the file.
How to view the permission associated with the files and directories?
To view all the files and subdirectories inside a directory with their permission, we will use “ls -l” (list command).
First, you have to open you Shell then write this command—
$ls –l /etc
The above linux command will list all files and subdirectories under /etc folder along with their permission, username, date and time, group.
The directories have “d” letter at the beginning like “drwxr-xr—“. “d” letter tell us that it a directory not a file. It helps us to distinguish files and directories.
rwx (read write execute)
It means the user has the permission to view or read, write or modify and execute the file. The user have all the three permission. He may also delete this file. The owner of the file have these permissions.
r-x (read execute)
The file has both read and execute permission without write or modify permission. The user can view the file content and also execute or run the file.
r- -(only read)
The file has only read permission. Write and execute permission are denied(–). User can’t delete this file. He may only view the content of this file without making any changes to it.
So you may use these permissions to make your file access more strong and powerful. I hope this will you learn linux more easily.

Twitter
Facebook
You-tube
Google
Blog