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