chmod

Permissions

Examples

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

Back