Donnerstag, 6. März 2014

user@machine:~$ sudo chmod 777 somefile


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)
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
#Permissionrwx
7full111
6read and write110
5read and execute101
4read only100
3write and execute011
2write only010
1execute only001
0none000



Keine Kommentare:

Kommentar veröffentlichen