X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=usr%2Flocal%2Fbin%2Faddsite;h=dcae1079667bd8661963d0aa051fcba71d47b091;hb=977db018748fa3721a2f5bdddd474e8bc252386d;hp=73eb5d39854ed366a6665c16a2b2002f47a4ac7c;hpb=8979fa02c5c4aae7373344d4f5c41eb0b8564932;p=matthijs%2Fservers%2Fdrsnuggles.git diff --git a/usr/local/bin/addsite b/usr/local/bin/addsite index 73eb5d3..dcae107 100755 --- a/usr/local/bin/addsite +++ b/usr/local/bin/addsite @@ -94,13 +94,13 @@ sudo chown -R 0:$GROUP "$DIR" 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, conf and data -sudo setfacl -R -m g::rwX "$DIR/htdocs" "$DIR/applications" "$DIR/conf" "$DIR/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" @@ -118,11 +118,14 @@ sudo setfacl -m u:$SCRIPT_USER:rwX "$DIR/logs" "$DIR/data" sudo sh -c "chown -R $SCRIPT_USER \"$DIR\"/logs/php.log* \"$DIR\"/logs/wipi.log*" sudo sh -c "chown -R $HTTPD_USER \"$DIR\"/logs/access.log*" -# Now, set the error_log setting in php.ini +# Now, set the error_log setting in php.ini. This ensures each domein will have +# a separate logfile for errors, since lighttpd only supports a single error +# log (When error_log is not set, error messages will go to lighttpd's log +# automatically). echo Updating `basename $PHP_CONFIG` - sudo sed -i "s#^error_log *=.*#error_log = $DIR/$PHP_ERRORLOG#" "$DIR/$PHP_CONFIG" +sudo update-php.ini # Done!