X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=usr%2Flocal%2Fbin%2Faddsite;h=724bdd0a5b8fccdcfc95e2d24571ed7bddbd9931;hb=bb0c99caa293cfce8dcb8877fe65348dd9b6e60e;hp=cc64350d1b6620d8c59209f8557d3be55000fc1e;hpb=30ec0775f29eaf4da5861ec2047cb4afdf93f211;p=matthijs%2Fservers%2Fdrsnuggles.git diff --git a/usr/local/bin/addsite b/usr/local/bin/addsite index cc64350..724bdd0 100755 --- a/usr/local/bin/addsite +++ b/usr/local/bin/addsite @@ -110,8 +110,8 @@ sudo setfacl -m u:$HTTPD_USER:rx "$DIR" # 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" +# Allow lighttpd to write new files in logs +sudo setfacl -m d:u:$HTTPD_USER:rwX,u:$HTTPD_USER:rwX "$DIR/logs" # Give scripts read access to the dir itself sudo setfacl -m u:$SCRIPT_USER:rx "$DIR" @@ -124,7 +124,7 @@ sudo setfacl -m u:$SCRIPT_USER:rwX "$DIR/logs" "$DIR/data" # Temp, chown existing log files 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*" +sudo sh -c "chown -R $HTTPD_USER \"$DIR\"/logs/access.log* \"$DIR\"/logs/*/access.log*" # 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