When we are working in UNIX how can we get to know about the permission of current working directory?
We can use
ls –ld for that.
If not we can use ls –l ..
In this case output can have lots of directories.
Therefore first one is more convenient.
Permission is divided in to three categories. Those are write permission, read permission and execute permission. And permission is granted to three groups. First one is owner of the file, next is the group of owners and the other one is rest of others.
Permission is represented in binary format with eight combinations.
R W E
22 21 20
0 0 1 Value 1 means execute only
0 1 0 Value 2 means read only
1 0 0 Value 4 means write only
1 1 1 Value 7 means read, write and execute
Likewise there are eight combinations.
Another way to change the permission
chmod g+w example1.sh
This command gives write permission to group
Monday, August 11, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment