Hi.
I believe it is uploading the files with permissions 555
here:
close_stdin: false)
end
# The path should already be escaped
ensure_remote_command("rm #{script}")
end
def prepare_start
@remote_script = cp_script_to_remote
@output_path = File.join(File.dirname(@remote_script), 'output')
@exit_code_path = File.join(File.dirname(@remote_script), 'exit_code')
@pid_path = File.join(File.dirname(@remote_script), 'pid')
@remote_script_wrapper = upload_data(
"echo $$ > #{@pid_path}; exec \"$@\";",
File.join(File.dirname(@remote_script), 'script-wrapper'),
555)
end
# the script that initiates the execution
def initialization_script
su_method = @user_method.instance_of?(SuUserMethod)
# pipe the output to tee while capturing the exit code in a file
Anyway, maybe the hardening mounts the destination with noexec
flag?
If that is true, you might need to reconfigure REX to use different working path, just like described here:
Yes, that’s the file. However bear in mind that file is managed by the installer and your customizations will be discarded on subsequent installer runs. If you want to make this change persistent, pass --foreman-proxy-plugin-remote-execution-script-remote-working-dir /var/foreman/cache to the installer.
Hope that helps!