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 "{}" \;



Gerelateerde artikelen op deze site:

    Mp3 streaming met Apache2 mod_musicindex.
    VirtualHost instellingen Apache2
    Wachtwoord op een website zonder .htaccess
    Wachtwoord op een website
    Website verhuizen – bezoekers doorsturen

Leave a Reply

Your email address will not be published.


× five = 30

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>