Forum: Cfengine Help Subject: copy_from with preserve restores wrong permissions [bug?] Author: joke Link to topic: https://cfengine.com/forum/read.php?3,18934,18934#msg-18934
hi, I've enabled the the preserve permissions option during copy_from but the permissions are not restored correctly on the client side. cf-agent (3.1.0b2) seems to skip the group permissions? I can't find any reason why permissions should not be restored correctly. I didn't add a directive to change them otherwise. server: $ ls -lah . -rw-r--r-- 1 root root 924 2010-10-28 10:03 ssh_config -rw-r--r-- 1 root root 1.3K 2010-10-28 10:02 sshd_config client: $ rm ssh_config sshd_config $ cf-agent -f failsafe.cf $ cf-agent ............. cf3 -> Copy of regular file succeeded /etc/cfengine3/packages/ssh.files/ssh_config to /etc/ssh/ssh_config.cfnew cf3 -> Attempting to preserve file permissions from the source cf3 -> Object /etc/ssh/ssh_config had permission 600, changed it to 604 cf3 -> Updated file from cfengine.seiken.de:/etc/cfengine3/packages/ssh.files/ssh_config ............. cf3 -> Copy of regular file succeeded /etc/cfengine3/packages/ssh.files/sshd_config to /etc/ssh/sshd_config.cfnew cf3 -> Attempting to preserve file permissions from the source cf3 -> Object /etc/ssh/sshd_config had permission 600, changed it to 604 cf3 -> Updated file from cfengine.seiken.de:/etc/cfengine3/packages/ssh.files/sshd_config $ ls -alh . ............. -rw----r-- 1 root root 924 2010-10-28 10:03 ssh_config -rw----r-- 1 root root 1.3K 2010-10-28 10:02 sshd_config ............. Here's are my configuration directives: body copy_from package_config(package, file) { compare => "hash"; copy_backup => "timestamp"; encrypt => "true"; portnumber => "5308"; preserve => "true"; servers => { "my.cfengine.server" }; source => "$(global.inputdir)/packages/$(package).files/$(file)"; stealth => "true"; } bundle agent package_ssh { "/etc/ssh/sshd_config" copy_from => package_config("ssh", "sshd_config") ; } _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine