addsite: Give lighttpd more permissions on logs.
authorMatthijs Kooijman <matthijs@stdin.nl>
Fri, 23 Jul 2010 11:50:52 +0000 (13:50 +0200)
committerMatthijs Kooijman <matthijs@stdin.nl>
Fri, 23 Jul 2010 11:50:52 +0000 (13:50 +0200)
This includes permissions to read and write log files not created by
lighttpd.

usr/local/bin/addsite

index cc64350d1b6620d8c59209f8557d3be55000fc1e..7d318071d47456bfb88fa4573de04c2a630f1916 100755 (executable)
@@ -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"