linux - Set permission using octal notation -


i know permission set using chmod having hard time understating how convert octal number permission.

for example

640 mean user has rw-r----x permission? becuase 4+2=6 , 4 = w , 0 = - ?

i understand 777 wide open because user has full control fo file 4+2+1 = 7 rwx permission group has rwx , second group has rwx permission if answer question answer be. rw-r----x doing wrong?

there 3 digits. first digit user permissions, second digit group permissions, third digit else's permissions.

every digit formed adding subset of of 4 (read), 2 (write), 1 (execute).

thus 6 4 0 means user (6) allowed read , write (4 + 2), group (4) allowed read (4), , else (0) has no permissions.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -