I have a question about running cron jobs via the GUI. It seems that when I setup a job to sync two servers using rsync-via-ssh, virtualmin’s GUI fails somehow, but the jobs themselves run fine if spawned in the background.
To clarify a bit: I have a command that does rsync over ssh. The command works totally fine if executed by hand. The command ALSO works fine if cron executes it in the background (lol as I’m finally seeing now after an hour of debugging).
An example of the command I’m trying to run is:
rsync -avz --delete-after --bwlimit=1024 -e ‘ssh -i “/some/path/to/private/key”’ email@example.com:/path/to/remote/folder/to/pull/from /local/path/to/receive/files/
For some reason, when I click that virtualmin GUI button while viewing the cron job “Run Now”, the command gets executed in some alternate way, and I suddenly get “Failed to execute ssh” “Permission denied” errors.
Just to double clarify here (because I understand this sounds totally weird): This command works BOTH when I run it via command line, AND when cron executes it in the background. The only time it fails with errors is when I’m in virtualmin’s GUI and click “Run Now” while viewing the cron job.
It’s not urgent or an error, since the job does actually work… but it freaked me out the last hour because I didn’t understand what was going on. Maybe until/if you can do a fix, some sort of notification about how the GUI is executing jobs differently than cron does? I dunno.
Oh I’m running Centos 6.5 if that helps, and I just yum’ed it up a few minutes ago.