Juiste rechten bestanden en directories Apache2.

Het volgende is schaamteloos van de site van pcextreme.nl geplukt:

  • mappen / directories: 755
  • bestanden zoals .html, .php: 600
  • uitvoerbare bestanden zoals .cgi, .pl, .sh: 700
  • .htaccess / .htpasswd: 644

Indien u beschikt over SSH toegang, dan kunt u de volgende commando’s uitvoeren om de rechten aan te passen.
Voer deze commando’s uit in uw homedirectory (cd ~)

find . -type d -uid "$UID" -exec chmod -v 755 "{}" \;
find . -type f -uid "$UID" -exec chmod -v 600 "{}" \;
find . -name '.htaccess' -uid "$UID" -exec chmod -v 644 "{}" \;
find . -name '.htpasswd' -uid "$UID" -exec chmod -v 644 "{}" \;
find . -name '*.cgi' -uid "$UID" -exec chmod -v 700 "{}" \;
find . -name '*.pl' -uid "$UID" -exec chmod -v 700 "{}" \;
find . -name '*.sh' -uid "$UID" -exec chmod -v 700 "{}" \;