correct permissions on apache log directories
We make accessible to our shared hosting clients their websitelogs so that they can download it.
The way I allow this, is that they can connect via ftp and their logs are located in wwwlogs directory and its named
domainname.com-access.log
domainname.com-error.log
However in the past a customer deleted his whole website and accidently deleted his wwwlogs directory ! When I reloaded apache after a configuration change it refused to restart because the log directory was missing for that virtual host.
How do I setup the permissions correctly so that customers cannot delete their log files and log directory? I would still like them to be able to download their log files. It should not allow them to upload anything to their wwwlogs directory either.
here are the current permissions:
drwxrwx--x custuid custgid wwwlogs
and the current permission for the files inside:
-rw-r--r-- root root domainname.com-access_log
any suggestions would be greatly appreciated