sudo chmod -R ugo+rwx /file/path
permission = read(4) + write(2) + execute(1)
===== CHMOD ===== ( change permission for file )
chmod [permissions] file
(u)ser, (g)roup, (o)ther, (a)ll
(r)ead, (w)rite, (e)xecute
(+) add permission, (-) remove permission, (=) set permission
#Examples:
chmod o+rwx file # add rwx for other
chmod o=rw file # set rw for other
chmod og-x file # remove x from other and group
chmod a+r file # everyone can read
# Numeric
chmod 724 file # owner=everything, group=writing, other=reading
first number is for owner of file,
second for group of owner,
third for everyone
===== OTHER =====
ls -l [path]
---------- # file
d--------- # directory
-rwx------ # owner
----rwx--- # group
-------rwx # other
chmod +x <fileName> # add execute permission to that file (.x.x.x)
chmod +r <fileName> # add read permission to a file
chmod +w <fileName> # add write permission to the file
chmod u+x <fileName> #add execute permission to owner of the file
chmod 400 <fileName> # set file only read permission to owner
#chmod-calculator.com