Linux File Permissions: chmod, chown, SUID and ACL

Security · 19.04.2026
Linux File Permissions: chmod, chown, SUID and ACL
find /var/www -type f -exec chmod 644 {} \;
find /var/www -type d -exec chmod 755 {} \;
chmod 600 wp-config.php
chown -R www-data:www-data /var/www/site/
Principle of least privilege: files 644, directories 755, config files 600. Never 777 on production.
← Back to Knowledge Base Ask Support