Linux Permission

A file or directory may have read,write,and execute permission.when a file is created,it is automatically given read and write permission for the owner,enabling you to display and modify the may change these permission to any combination you want.a file can also have read only permission,preventing any modifications.

Read Write Execute Permission

Each category has its own set of read,write,and execute permission,the first set controls the user's own access to his or her files the owner access,the second set controls the access of the group to a user's file.the third set controls the access of all other users to the user's files.

The three sets of read,write,and execute permission for the three categories owner,group and other make a total of nine tyoes of permission.the ls command with the -l option display detailed information about the file,including the permission Ex $ls -l demofile

chmod Command

chmod stands for "change mode" and it is used to define the way a file can be use the chmod command to change different permission configurations.chmod takes two list as its arguments,permission change and filenames.

You can specify the list of permission in two different way uses permission symbols(alphanumeric characters) and is referred to the symbolic method.the other to use octal numbers(The digits 0 to 7),the following example of assign permission for a demo file.

chmod u=rwx,g=r,o=r demofile

this is the symbolic permission notations.the letter "u" stands for User "g" stands for Group "o" stands for Others.Similarly, "r" stands for Read,"w" stands for Write and "x" stands for Execute,the equals sign(=) is used to assign the permission separated with commas.

ctal Permission Notations

chmod 754 demofile

Here is the digits 7,5 and 4 each individually represent the permission for the user,group and others in order.each digit is a combination of the numbers 4,2,1, and 0,"4" stands for Read,"2" stands for Write,"1" stands for Execute,"0" stands for No Permission.

Share Share on Facebook Share on Twitter Share on Google+ Share on LinkedIn Pin on Pinterest Share on Stumbleupon Share on Tumblr Share on Reddit Share on Diggit