keeping ownership to the real user behind sudo
[feisty_meow.git] / scripts / system / add_apache_site.sh
index 30ff1f50a7585056430b24733d12462aa12e6d27..57b5d519be85af004ec2f17bcae60036bc25a2c8 100644 (file)
@@ -66,6 +66,9 @@ function write_apache_config()
     Include /etc/apache2/conf-library/rewrite-enabling.conf
 </VirtualHost>
 " >"$site_config" 
+
+  chown "$(logname):$(logname)" "$site_config"
+  test_or_die "setting ownership on: $site_config"
 }
 
 # turns on the config file we create above for apache.