Thursday, November 5, 2015

Unix Permissions and values







Change UNIX permissions by using the simple command.


Syntax:


chmod 775 filename or foldername


Example:



chmod 775 test.txt


In the above cmd we are changing the permission of test file to 775 (Read/Write/Execute).


Below is the table of permissions.


UNIX Permissions:
ValuePermissionDirectory Listing
0No read, no write, no execute---
1No read, no write, execute--x
2No read, write, no execute-w-
3No read, write, execute-wx
4Read, no write, no executer--
5Read, no write, executer-x
6Read, write, no executerw-
7Read, write, executerwx
rwx rwx rwx = 111 111 111 rw- rw- rw- = 110 110 110 rwx --- --- = 111 000 000 and so on... rwx = 111 in binary = 7 rw- = 110 in binary = 6 r-x = 101 in binary = 5 r-- = 100 in binary = 4

No comments:

Post a Comment