Remove write permission for others recursively
fix 777 permissions | remove world writable permission | chmod o-w recursive | fix insecure permissions in webspace | chmod | securityCaution: This command changes the system. Understand what it does before you run it.
chmod -R o-w /var/www/vhosts/example.com/httpdocsUses o-w to remove only the write permission for others, while owner and group permissions stay as they are. Gentler than a blanket reset to 755 and 644, because intentional deviations are preserved. Test the site and uploads afterwards.
Note: If an application relied on write permission for others because PHP runs as a different user, uploads will fail afterwards. The real fix is then the correct owner, not 777.
Also searched as
- fix 777 permissions
- remove world writable permission
- chmod o-w recursive
- fix insecure permissions in webspace