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