From: Matthijs Kooijman Date: Fri, 23 Jul 2010 11:50:52 +0000 (+0200) Subject: addsite: Give lighttpd more permissions on logs. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=31e323bd75fb798d58b0d19f8965b23dda181477;p=matthijs%2Fservers%2Fdrsnuggles.git addsite: Give lighttpd more permissions on logs. This includes permissions to read and write log files not created by lighttpd. --- diff --git a/usr/local/bin/addsite b/usr/local/bin/addsite index cc64350..7d31807 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"