lorf / zapache

Zabbix Apache Monitoring Script (from https://www.zabbix.org/wiki/Docs/howto/apache_monitoring_script#Method_3, originally from https://www.zabbix.com/forum/showthread.php?p=62457)
85 stars 44 forks source link

touch: cannot touch: Permission denied #6

Closed moses-moore-spafax closed 9 years ago

moses-moore-spafax commented 9 years ago

The temp file used by zapache is the same filename for every user; thus if I run zapache then anyone else on the same machine will see the 'permission denied'. This shows up when a normal user or root runs zapache to test it before zabbix_agentd is able to run it for the first time.

The workaround is rm /tmp/zapache-* and prevent any users from launching zapache until zabbix_agentd has had a chance to run it (and lock everyone else out).

For a permanent fix, maybe use $UID as part of cache_prefix ?

lorf commented 9 years ago

Good. Thanks!