Previously, we used rsync's --perm option to mirror source permissions
at target. This could have caused the files to be inaccessible by the
TFTP server, because source permissions were to tight. To overcome
this problem, we now always set the target permissions to the default
value by using --chmod. From rsync manual:
To give new files the destination-default permissions (while
leaving existing files unchanged), make sure that the --perms
option is off and use --chmod=ugo=rwX.
Note that this change does not require changes on the server
side (novaboot-shell).
my $istty = -t STDOUT && ($ENV{'TERM'} || 'dumb') ne 'dumb';
my $progress = $istty ? "--progress" : "";
if ($files) {
- system_verbose("rsync $progress -RLp $rsync_flags $files $real_server");
+ system_verbose("rsync $progress -RL --chmod=ugo=rwX $rsync_flags $files $real_server");
if ($server =~ m|/\$NAME$| && $concat) {
my $cmd = join("; ", map { "( cd $path/.. && cat */$_ > $_ )" } @bootloader_configs);
system_verbose($hostname ? "ssh $hostname '$cmd'" : $cmd);