When I upgrade my cacti (last version tested: 0.8.6h_p20060108) the files inside the scripts directory (cacti/scripts) are changed in this way: - Execution attribute is removed - owner and group is set to root So, whenever I upgrade my cacti I have to do: chmod 700 * chgrp cacti * chown cacti * I don't know exactly if this is a bug, but it is really annoying
I wonder if this is the intended result from webapp-config. What version of webapp-config are you running? Webapp folks: Can you confirm this assumption and possibly offer me any advice for a good solution to the issue? Thanks-
> I wonder if this is the intended result from webapp-config. What version of > webapp-config are you running? webapp-config version in my machine is 1.50.13
If I understood correctly cacti internally executes perl /path/to/script fex, perl /var/www/localhost/htdocs/cacti/scripts/query_unix_partitions.pl index At least I see such behavior at cacti version 0.8.6i. So I think you do not need neither make contents of scripts directory executable nor chown them. Jesus: Thus Why do you need to add cacti user/group and set executable permitions? What does not work? Lance: AFAIU webapp-config/webapp.eclass preserves permissions for files and directories. Citation from webapp.eclass: "For now, we just make sure that root owns everything, and that there are no setuid files." Thus may be it's better to do 'cp -rp' inside ebuild instead of 'cp -r', but the result is the same :)
(In reply to comment #3) > Jesus: Thus Why do you need to add cacti user/group and set executable > permitions? What does not work? exec permission doesn't seem to be necessary. But i have to chown the script to cacti or i get the following error: 01/09/2007 02:15:07 AM - CMDPHP: Poller[0] Host[3] DS[77] WARNING: Result from CMD not valid. Partial Result: 01/09/2007 02:15:07 AM - CMDPHP: Poller[0] Host[3] DS[78] WARNING: Result from CMD not valid. Partial Result: 01/09/2007 02:15:07 AM - CMDPHP: Poller[0] Host[3] DS[79] WARNING: Result from CMD not valid. Partial Result:
(In reply to comment #4) > exec permission doesn't seem to be necessary. But i have to chown the script > to cacti or i get the following error: > > 01/09/2007 02:15:07 AM - CMDPHP: Poller[0] Host[3] DS[77] WARNING: Result from > CMD not valid. Partial Result: Well. But then could you please describe the sequence of operations how to get this error message? What you have configured and where do you look for error message?
My problem is that I am invoking the poller from cron: */5 * * * * cacti /usr/bin/php /var/www/localhost/htdocs/cacti/poller.php > /dev/null 2>&1 as cacti user. So, this is why I have to chown the scripts each time I emerge a new cacti ebuild. Probably this is not a real bug and could be closed.
By default you should have files in scripts directory world readable. At least I have the following permisions: root:root -rw-r--r--. And there is no need to chown/chmod files. If you have something different reopen then. BTW. Note 0.8.6i-r1 comes into stable due to security vulnerabilities (bug 159278). Thus use that version :-)
In case anyone reads this later, the problem is the templates that you're using. All templates should specify the full PATH to the script, and also the interpreter used to call the script. They shouldn't rely on things like executable bits, or they're not very portable.