100 likes | 105 Views
Linux is a clone of UNIX operating system, it is a multi-user operating system, which can be accessed by many users at a time.<br>Because of this , it raises the question on its security, that it can be easily corrupted or any one can change or remove the crucial data.<br>
E N D
file permissions in Linux OS https://cloudminister.com
Why do we use file permission in Linux/Unix? Linux is a clone of UNIX operating system, it is a multi-user operating system, which can be accessed by many users at a time. Because of this , it raises the question on its security, that it can be easily corrupted or any one can change or remove the crucial data. So, taking care of the security. Linux divides authorisation level into 2 levels 1…Ownership 2…Permissions
Ownership In linux the system is allocated 3 types of owner → First one is “User” Owner of the file.The person who creates the file is called the owner. → Second one is “Group” In a group there can be multiple users we can put multiple users in a group and assign the same file permission. → Third one is “other” Other can be anybody except user & group
Permissions For every user, group & other there their is set permission • Read • Write • Execute User → rwx Group → rwx (-) → file -rw-rwxrw- Other → rwx (d) → directory drw-rwxrwxrw-
Read – Gives the permission to read the file, Write – Gives the permission to modify the file it gives the authority to add ,remove ,rename the file which is stored in the directory. Execute – we cannot open the file if the execute permission is not given to the file. Example:-
Give permission to file and directory has two way 1. Symbolic method 2. Octal method / numerical method (chmod) command use to change permission Default permission of file :-
Default permission of file :- Symbolic method is used alphabets to set permission. U u refer to user G g refer to group O o refer to other (+) Use to add permission (-) Use to remove permission (=) Use to overwrite permission
Octal or numeric method Octal method use numbers to set permission 0 (—) No permission 1 (–x) Execute permission 2 (-w-) Write permission 3 (-wx) Write and execute permission 4 (r–) Read-only permission 5 (r-x) Read & execute permission 6 (rw-) Read & write permission 7 (rwx) All permission
Conclusion: By following this tutorial you will learn what are the permissions as well as special permission in Linux/Unix.