Tuesday 17 December 2013

Basic file permisons in Red Hat linux

Hello friends I am Deepak Saini  And i m trying to expalin the basic files permissions.

Permissions :- we are using the file permissions to protect our files and directories and devices on the system.These permissions can be manupulate to allow (or disallow)acess to files and directories on differents parts of the system.
We are using the chmod to change the permissions of the file or directories

Umask :- In this we are define or display the defaults permissions of the files and directory

Before starting to use commands ,let's look at how permissions work first.Linux permissions are implemented through to properties of the  files and defined by three separate categories.They are broken down into following 

1 User  Person who owns the file
2 Group Group that owns the file
3 Other All other users on the system

Permissions in linux can be assigned one of two ways. You can use the mnemonic or a single digit to represent permissions level

Operation           Digit      Mneomonic         Description 
Read                    r              4                         view file contents
Write                   w              2                         Write to or change
Execute                x              1                         Run the file

Let's start

1 How we check the current permissions of a file
  syntax :- # ll /root/Desktop 
   by this command we are check the all files permissons on the desktop

How change the permission of a file
   syntax :- # chmod  <permissions> <file name>

    you can change the permissions of files and directories by this method  

example
  chmod 766 /root/Desktop/im.txt
when we are execute this command the we are give the owner or use full permission 7 first and the group only read and write permission 4+2 =6 and same for the others so that is the method

Thanks for reading and sorry for my R.I.P english _/\_ Jai HIND

0 comments:

Post a Comment