For a permission Assignment command: sudo chmod -r 764xxx; We must understand what it means:
(1) What each field means: sudo chmod -R (change folder and its subfolders)
7 (Owner rights) 6 (Group User Rights) 4 (other user rights) XXX (target file)
(2) First understand the following permissions correspondence (Execute permission letter representation Permission meaning Execute permission numeric representation):
r Read rights 4;
w Write rights 2;
x executive Rights 1;
rwx (read, write, Execute)
rw-(read, write)
.....
(3) 7, 6, 4 Origin
to rwx:4+2+1=7; to rw-:4+2=6; R-x:4+1=5
(4) Common Permissions command:
sudo chmod 777-r xxx (change folder and its subfolders permissions to 777) sudo chmod 600xxx (only owner has read and write permission) sudo chmod 644xxx (owner has read and write permissions, group user only read permissions) sudo chmod 700xxx (only the owner has read and write and execute permissions) sudo chmod 666xxx (everyone has read and write permissions)
Linux chmod commands and permissions meanings