ALWAYS KEEEP THE PERMISSION IN THE READ WRITE EXECUTE ORDER (rwx) !!!!!
rwx = 421 or 4+2+1 =7
user group others
| | |
rwx rwx rwx
so it is written as rwxrwxrwx
From the above example if you want to remove the (write permission) for group , ( read and write permission ) for others , it will look something like this
rwxr-x--x
---> solution to above example rwxr-x--x
access u g o
binary 421 421 421
enable 111 101 001
----------------------------------------
Result 421 401 001
NOw add all the results for ugo respectively 4+2+1=7 4+0+1=5 0+0+1
The '-' means that that permission is not given to that particular group. When calculating permissions as a numeric value, '-' is considered as zero, you are correct! I would suggest you to go through the previous topic once again if you need more understanding.
Its very simple, Input: rwx r-x --x : I divided into 3 parts as one for user(owner), group and others respectively Binary: 421421 421: Just represented as binary format to calculate the number where ever '-' means that permissions are not given and hence we should put it as zero(0) and where permission are specified in given input then will have to take corresponding binary value and add it. Owner Group Others (r w x r - x - - x) In this scenario (4+2+1 4+0+1 0+0+1) which results to (7 5 1) without space(751). Enjoy the lengthy explanation.... Hope it clears your doubt. If not experts will help....
Please login to comment
11 Comments
ALWAYS KEEEP THE PERMISSION IN THE READ WRITE EXECUTE ORDER (rwx) !!!!!
rwx = 421 or 4+2+1 =7
user group others
| | |
rwx rwx rwx
so it is written as rwxrwxrwx
From the above example if you want to remove the (write permission) for group , ( read and write permission ) for others , it will look something like this
rwxr-x--x
---> solution to above example rwxr-x--x
access u g o
binary 421 421 421
enable 111 101 001
----------------------------------------
Result 421 401 001
NOw add all the results for ugo respectively 4+2+1=7 4+0+1=5 0+0+1
So The finaal Anser is 751
7 Upvote ShareThis comment has been removed.
it should be like
Upvote Sharerwx-rx--x not rwxr-x--x
Hi,
The correct representation is Read (r), then Write (w), and finally Execute (x). So, it's rwxrwxrwx.
Thanks.
3 Upvote ShareThis comment has been removed.
rwxr-x--x into this whats the meaning of ' - '. As per my understanding ' - ' equal to Zero. Please confirm.
Upvote ShareHi,
The '-' means that that permission is not given to that particular group. When calculating permissions as a numeric value, '-' is considered as zero, you are correct! I would suggest you to go through the previous topic once again if you need more understanding.
Thanks.
-- Rajtilak Bhattacharjee
1 Upvote ShareExplanation for beginners like me
can someone explain this please??
Upvote ShareIts very simple,
Upvote ShareInput: rwx r-x --x : I divided into 3 parts as one for user(owner), group and others respectively
Binary: 421421 421: Just represented as binary format to calculate the number
where ever '-' means that permissions are not given and hence we should put it as zero(0) and where permission are specified in given input then will have to take corresponding binary value and add it.
Owner Group Others
(r w x r - x - - x)
In this scenario (4+2+1 4+0+1 0+0+1)
which results to (7 5 1) without space(751). Enjoy the lengthy explanation.... Hope it clears your doubt. If not experts will help....
No!! This i very clear. Thank you so much
Upvote Share