Page MenuHomePhabricator

autochmod (BSD userland)

Authored By
dereckson
Oct 1 2015, 6:54 PM
Size
878 B
Referenced Files
None
Subscribers
None

autochmod (BSD userland)

#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

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/u3/v4/ypu3tlulh435gr5o
Default Alt Text
autochmod (BSD userland) (878 B)

Event Timeline