X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=usr%2Flocal%2Fbin%2Faddsite;h=2d8d235aa31d2638b18623e881e7c9cf4f2fcc90;hb=0d40af67dc1253cfe9ffc6e6d960ef7d18d2f10e;hp=815ecfc1719ed81be24824c2e3dc19665491b62e;hpb=b436a7b3f9038c19993e031189dfef12a5601a0a;p=matthijs%2Fservers%2Fdrsnuggles.git diff --git a/usr/local/bin/addsite b/usr/local/bin/addsite index 815ecfc..2d8d235 100755 --- a/usr/local/bin/addsite +++ b/usr/local/bin/addsite @@ -93,14 +93,14 @@ sudo chown -R 0:$GROUP "$DIR" # By default, let the owner have write access, the group have read access sudo setfacl -R --set d:u::rwX,d:g::rX,d:o::-,u::rwX,g::rX,o::- "$DIR" -# Give the group write access to htdocs, applications and conf -sudo setfacl -R -m g::rwX "$DIR/htdocs" "$DIR/applications" "$DIR/conf" +# Give the group write access to htdocs, applications, conf and data +sudo setfacl -R -m g::rwX,d:g::rwX "$DIR/htdocs" "$DIR/applications" "$DIR/conf" "$DIR/data" # Give lighttpd read access to the dir itself sudo setfacl -m u:$HTTPD_USER:rx "$DIR" -# Allow lighttpd to read anything in htdocs, applications and conf -sudo setfacl -R -m d:u:$HTTPD_USER:rX,u:$HTTPD_USER:rX "$DIR/htdocs" "$DIR/applications" "$DIR/conf" +# Allow lighttpd to read anything in htdocs, applications, conf and data +sudo setfacl -R -m d:u:$HTTPD_USER:rX,u:$HTTPD_USER:rX "$DIR/htdocs" "$DIR/applications" "$DIR/conf" "$DIR/data" # Allow lighttpd to write new files in logs (but not touch existing or those created by lighttpd) sudo setfacl -m u:$HTTPD_USER:rwX "$DIR/logs" @@ -123,6 +123,7 @@ sudo sh -c "chown -R $HTTPD_USER \"$DIR\"/logs/access.log*" echo Updating `basename $PHP_CONFIG` sudo sed -i "s#^error_log *=.*#error_log = $DIR/$PHP_ERRORLOG#" "$DIR/$PHP_CONFIG" +sudo update-php.ini # Done!