chmod 777 file permissions code example Example 1: ubuntu change permissions 777 sudo chmod -R 777 /var/www Example 2: chmod 777 chmod -R 777 directory