Page MenuHomePhabricator
Paste P1861

autochmod (BSD userland)
ActivePublic

Authored by dereckson on Oct 1 2015, 6:54 PM.
Tags
None
Referenced Files
F5287801: autochmod (BSD userland)
Nov 22 2017, 4:10 AM
F857722: autochmod (BSD userland)
Oct 1 2015, 6:54 PM
Subscribers
None
#Default permissions for a SuEXEC webserver installation
#License: not an original work, only trivial find commands,
# so not eligible to copyright
#Note: -print0 / xargs -0 permet de gérer les espaces :)
#Tout d'abord les dossiers en 711
find . -type d -print0 | xargs -0 chmod 711
#Par défaut, tous les fichiers vont en 644 :
find . -type f -print0 | xargs -0 chmod 644
#2ème tour, les scripts en 700
#-iname afin de traiter aussi .PHP .CGI ...
find . -type f -iname "*.php" -print0 | xargs -0 chmod 700
find . -type f -iname "*.php3" -print0 | xargs -0 chmod 700
find . -type f -iname "*.phps" -print0 | xargs -0 chmod 700
find . -type f -iname "*.tcl" -print0 | xargs -0 chmod 700
find . -type f -iname "*.cgi" -print0 | xargs -0 chmod 700
find . -type f -iname "*.pl" -print0 | xargs -0 chmod 700
find . -type f -iname "*.py" -print0 | xargs -0 chmod 700

Event Timeline

dereckson changed the title of this paste from untitled to autochmod (BSD userland).
dereckson updated the paste's language from autodetect to autodetect.