Permissions
u = User (Owner)
g = Group of the owner user
o = Other users
a = All or ugo
r = 4
w = 2
x = 1
None = 0
Read, Write and Execution for User
chmod u=rwx {file}
7 = 4 + 2 + 1
ugo
chmod 700 {file}
Read for User and Group
chmod ug=r {file}
ugo
chmod 440 {file}
More open mode
chmod ugo=rwx {file}
chmod a=rwx {file}
chmod 777 {file}
Web Server
sudo chown -R www-data:www-data /var/www/html
sudo find /var/www/html -type d -exec chmod g+w {} \;
sudo find /var/www/html -type f -exec chmod g+w {} \;
linux command