change permissions for all directories code example Example: find change permissions to subdirectories sudo find /var/www/html -type d -exec chmod 755 {} \;