Forum: Cfengine Help Subject: Bug in copy_from's check_root? Author: jgreer Link to topic: https://cfengine.com/forum/read.php?3,17597,17597#msg-17597
I've been doing some testing with v. 3.0.5 using copy promises that pull files from my local machine. I noticed that, when check_root is enabled on a recursive copy, the permissions on the source directory of my file are altered, rather than the destination copy. Line 89 in files_copy.c looks like the culprit to me - shouldn't "source" there be "destination"? bundle agent test { files: "/tmp/copy_from2/" copy_from => copy("/var/cfengine/masterfiles/tmp/copy_from/", "myhost", "digest", "false", "true", "true", "5308", "true", "true", "false", "false"), perms => permissions_mode("500"), depth_search => searchsettings_std("inf"), action => actionsettings_fix_inform("inform"); } body copy_from copy( source, servers, compare, copy_backup, encrypt, check_root, portnumber, preserve, purge, stealth, verify ) { source => "$(source)"; servers => { "@(servers)" }; compare => "$(compare)"; copy_backup => "$(copy_backup)"; encrypt => "$(encrypt)"; check_root => "$(check_root)"; portnumber => "$(portnumber)"; preserve => "$(preserve)"; purge => "$(purge)"; stealth => "$(stealth)"; verify => "$(verify)"; } r...@myhost:/tmp# cf-agent -K -> Object /tmp/copy_from2/testfile1 had permission 600, changed it to 500 -> Object /var/cfengine/masterfiles/tmp/copy_from/ had permission 755, changed it to 500 Thanks, -Jess _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine