Public bug reported:
Binary package hint: cfengine3
The problem found in package version 3.0.5+dfsg-1 from Natty.
When running as non-root user, cf-agent complains "Can't open lock-log
file". The error happens because it tries to work with files in
/var/log, but doesn't have enough permissions.
You may reproduce the issue from a non-root account as follows:
rm -rf ~/.cfagent
mkdir ~/.cfagent ~/.cfagent/bin ~/.cfagent/inputs
cp /usr/sbin/cf-* ~/.cfagent/bin/
cat - >~/.cfagent/inputs/promises.cf <<EOF
# -*- coding: utf-8; mode: cfengine -*-
body common control
{
bundlesequence => { "test" };
}
bundle agent test
{
commands:
"/bin/date" ;
}
EOF
env LANG=C cf-agent; echo $?
The commands will produce something like that:
Q: ".../bin/date": Tue May 10 15:40:36 YEKST 2011
I: Last 1 QUOTed lines were generated by promiser "/bin/date"
Can't open lock-log file /var/log/cf3.<hostname>.runlog
!!! System error for fopen: "Permission denied"
1 <-- (take note exit code signals about some error)
** Affects: cfengine3 (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/780410
Title:
cfengine can't access logfile when running as non-root
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs