The scripts are uploaded via Veeam and then executed using sudo, but they will not execute because they are never given the execute bit and sudo hates that.
I have a support ticket open with Veeam but was curious if anyone else had any input.
Here is the relevant log out put:
Code: Select all
[28.07.2015 09:03:00] <15> Info [ScriptInvoker] Creating Linux invoker.
[28.07.2015 09:03:00] <15> Info [ScriptInvoker] Starting pre-freeze script execution
[28.07.2015 09:03:00] <15> Info [ScriptInvoker] Running Linux script (SSH) 'C:\Users\root\Documents\scripts\uid.sh'
[28.07.2015 09:03:00] <15> Info [Ssh] Creating new connection [host: '10.33.33.51', port: 22, user: 'veeam', elevation to root: 'yes', autoSudo: no, auth type: 'PublicKey'.].
[28.07.2015 09:03:00] <15> Info [Ssh] logon, host: '10.33.33.51', port: 22, user: 'veeam', elevation to root: 'yes', autoSudo: no, auth type: 'PublicKey'.
[28.07.2015 09:03:00] <15> Info [Ssh] Server (10.33.33.51) version string: "SSH-2.0-OpenSSH_5.3"
[28.07.2015 09:03:00] <15> Info [ScriptInvoker] SSH connection is established (10.33.33.51).
[28.07.2015 09:03:01] <15> Info Executing: sudo /tmp/477b2d2b-569e-456b-9e04-90fb6c9fac85_uid.sh;echo $?
[28.07.2015 09:03:01] <15> Info Executing: sudo rm -f /tmp/477b2d2b-569e-456b-9e04-90fb6c9fac85_uid.sh
[28.07.2015 09:03:01] <15> Info [Ssh] Connection [host: '10.33.33.51', port: 22, user: 'veeam', elevation to root: 'yes', autoSudo: no, auth type: 'PublicKey'.] is disposing.
[28.07.2015 09:03:01] <15> Error [ScriptInvoker] Failed to execute script in lin guest machine over SSH. Script path: C:\Users\root\Documents\scripts\uid.sh.
[28.07.2015 09:03:01] <15> Error Exception of type 'Veeam.Backup.Core.CGuestScriptTimeoutExc' was thrown. (Veeam.Backup.Core.CGuestScriptTimeoutExc)
[28.07.2015 09:03:01] <15> Error at Veeam.Backup.Core.CSshScriptInvoker.ExecScript(String localPath, TimeSpan timeout)
[28.07.2015 09:03:01] <15> Warning [ScriptInvoker] Script execution timeout.
Code: Select all
[veeam@jsandbox ~]$ ls -lt /tmp/uid.sh
-rw-r--r-- 1 veeam veeam 81 Jul 28 09:15 /tmp/uid.sh
[veeam@jsandbox ~]$ sudo /tmp/uid.sh; echo $?
sudo: /tmp/uid.sh: command not found
1
[veeam@jsandbox ~]$ chmod +x /tmp/uid.sh
[veeam@jsandbox ~]$ ls -lt /tmp/uid.sh
-rwxr-xr-x 1 veeam veeam 81 Jul 28 09:15 /tmp/uid.sh
[veeam@jsandbox ~]$ sudo /tmp/uid.sh; echo $?
0
So is this a bug with Veeam, or is there a way to configure sudo to execute scripts even if there is no exe bit enabled, or do i write a wrapper?