• Should be 755 for dirs, 644 for files except in SPECIAL cases
ls -l /var/www/wordpress
cd/var/www/wordpress # Make permission bits of all directory to 755 find. -type d -exec chmod 755 {}\;
# Make permission bits of all files to 644 find. -type f -exec chmod 644 {}\;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Running sites as root
• For example, don't run apache as root because if apache gets compromised, whoever will have full control on the machine • OWNER IS THE ONLY ONE WHO CAN WRITE
• Most hosting companies use shared hosting • if you have one site or 23 sites, they're all running under ONE user and ONE PHP process • One infected site means that everything is at risk, since that site can write to other sites (and thereby cross-infect them)