Hello Friends I am Deepak saini And today i am discusing the permissions on files and directory and how we are edit or set or check current permissions :)
Lets Start
There are three type of permission on a file or directory
1 Read
2 Write
3 Execute
1 Read :- In this permission we are able to list the content of the directory but can't open and execute the files we are only able to list the content of a directory. And in the case of file we are able to read the text but not the help of editors.We are using the cat command in this case of permission.
2 Write :- In this permission we are able to create the sub directory or file in the directory and we are able to move copy and delete in the directory.And in the case of file we are able to modify,cut,copy and paste the content of file.
3 Execute :- In this case of permission we are able to open or change the directory.And in the case of fiel we are able to run as program a file but not as text file.
How mention permission in the Red hat linux or others
There are two methods
1 Alphabetical
2 Numerical
Alphabetical Numerical
r 4
w 2
x 1
rwx 7
Here r for read only and x for execute and w for write in alphabet .
Permissions on Directory in Red Hat linux or other
0 - no permissions
1 - can change the dir but can't list or create
2 - can not list and execute but create sub dir
3 - can not list but change and create in it
4 - only can list the content
5 - read and execute but can't write anything
6 - read and write but can't write anything
7 - full permissions
Permissions on a file
0 - no permissions
1- can execute only
2- can be append only
3- can be append and execute
4 - read only
5 - file can be read and execute but not modify
6 - file is a txt file and modify
7 - full permission
How the Default permissions are set ?
on directory
Default permission = full permission - umask
777 - 022
=755(rwxr-xr-x)
umask by default set 022
On file
Default permission = full permission - umask
666 - 022
644(rw-r--r--)
How to Set umask manually
umask <value of umask>
value of umask like this 022 o 111 like this
Thanks for reading and Sorry for my R.I.P english :P _/\_ Jai Hind
Lets Start
There are three type of permission on a file or directory
1 Read
2 Write
3 Execute
1 Read :- In this permission we are able to list the content of the directory but can't open and execute the files we are only able to list the content of a directory. And in the case of file we are able to read the text but not the help of editors.We are using the cat command in this case of permission.
2 Write :- In this permission we are able to create the sub directory or file in the directory and we are able to move copy and delete in the directory.And in the case of file we are able to modify,cut,copy and paste the content of file.
3 Execute :- In this case of permission we are able to open or change the directory.And in the case of fiel we are able to run as program a file but not as text file.
How mention permission in the Red hat linux or others
There are two methods
1 Alphabetical
2 Numerical
Alphabetical Numerical
r 4
w 2
x 1
rwx 7
Here r for read only and x for execute and w for write in alphabet .
Permissions on Directory in Red Hat linux or other
0 - no permissions
1 - can change the dir but can't list or create
2 - can not list and execute but create sub dir
3 - can not list but change and create in it
4 - only can list the content
5 - read and execute but can't write anything
6 - read and write but can't write anything
7 - full permissions
Permissions on a file
0 - no permissions
1- can execute only
2- can be append only
3- can be append and execute
4 - read only
5 - file can be read and execute but not modify
6 - file is a txt file and modify
7 - full permission
How the Default permissions are set ?
on directory
Default permission = full permission - umask
777 - 022
=755(rwxr-xr-x)
umask by default set 022
On file
Default permission = full permission - umask
666 - 022
644(rw-r--r--)
How to Set umask manually
umask <value of umask>
value of umask like this 022 o 111 like this
Thanks for reading and Sorry for my R.I.P english :P _/\_ Jai Hind
0 comments:
Post a Comment