Examples:
user@machine:~$ touch somefile
user@machine:~$ ls -lh
total 0
-rw-r--r-- 1 user user 0 Mar 7 02:47 somefile
user@machine:~$ sudo chmod 777 somefile
[sudo] password for user:
user@machine:~$ ls -lh
total 0
-rwxrwxrwx 1 user user 0 Mar 7 02:47 somefile
the permissions are mapped as followed:
Owner Group Other(Everyone)
Owner Group Other(Everyone)
read write execute read write execute read write execute
rwx rwx rwx
decimal unix binary
770 -> rwxrwx--- 111 111 000
700 -> rwx------ 111 000 000
110 -> --x--x--- 001 001 000
100 -> --x------ 001 000 000
222 -> -w--w--w- 010 010 010
220 -> -w--w---- 010 010 000
200 -> -w------- 010 000 000
333 -> -wx-wx-wx 011 011 011
444 -> r--r--r-- 100 100 100
356 -> -wxr-xrw- 011 101 110
755 -> rwxr-wr-w 111 101 101
Numerical permissions
| # | Permission | rwx |
|---|---|---|
| 7 | full | 111 |
| 6 | read and write | 110 |
| 5 | read and execute | 101 |
| 4 | read only | 100 |
| 3 | write and execute | 011 |
| 2 | write only | 010 |
| 1 | execute only | 001 |
| 0 | none | 000 |
Keine Kommentare:
Kommentar veröffentlichen