cf-sketch not setting permissions for policy to be able to run
After uninstalling all sketches, installing vcs_mirror, configuring and running
cf-sketch> run
Generated standalone run file /home/cmdln/.cfagent/inputs/standalone-cf-sketch-runfile.cf
Now executing the runfile with: /var/cfengine/bin/cf-agent -f /home/cmdln/.cfagent/inputs/standalone-cf-sketch-runfile.cf
File /home/cmdln/.cfagent/inputs/sketches/CFEngine/stdlib/cfengine_stdlib.cf (owner 1000) is writable by others (security exception)
cf-sketch> run
Generated standalone run file /home/cmdln/.cfagent/inputs/standalone-cf-sketch-runfile.cf
Now executing the runfile with: /var/cfengine/bin/cf-agent -f /home/cmdln/.cfagent/inputs/standalone-cf-sketch-runfile.cf
File /home/cmdln/.cfagent/inputs/sketches/VCS/vcs_mirror/main.cf (owner 1000) is writable by others (security exception)
Definitely to be fixed. Sorry for the trouble.
In the meantime, I patched the vim_cf3 plugin to fix permission on save :)
How about (in config.json):
runfile.perms is an optional string that will be used as the permission. When it's missing we won't try to set the permissions of the runfile.
Let me know what you think and I will do.
ping @nickanderson
That sounds fine, but setting for the runfile alone wont cover the sketch files that are included as well.
In 3.5.0 this is no longer a problem, IIUC.
But for the sake of CFE 3.4.x DC users, how about defaulting the runfile and *.cf install permissions to 600?