Allthough /mnt/array1/shareDir on root@dsthost is fully writable when using ssh from any remote host, it is not when a cron-started script tries to access it, even if it uses the same private/public key pair to access.

If the ssh key is password protected, you can't use it in this scenario,because there is noone entering the password. Could you please use the COMPLETE path for rsync and retry?E.g. /mnt/.optware/bin/rsync (your path may be different).

_________________Please do not use private mail (PN/M) to ask questions. Use the proper forum instead. (me)

If there is no verified backup of a dataset, the dataset, by definition, is unimportant. (c't 2012)

If the ssh key is password protected, you can't use it in this scenario,because there is noone entering the password. ;-)

Of course, this is clear, I thought you know something like 'rsync does not accept passphrase-less keys' when I asked for the relevance. My key is WITHOUT passphrase (allthough there would actually be ways to pass one to ssh without a roboter sitting in front of the pc, eg sshpass)

Quote:

Could you please use the COMPLETE path for rsync and retry?

To be honest, my script never reached the point where rsync is invoked. The best is to show you a part of the code (the variable identifiers are self-explaining, I think):

The test -d '$dstBasePath' check passed ok, but test -w '$dstBasePath' sets $xc (== eXitCode) to value 54, which then makes the script to log an error and send me an e-mail with an appropriate error message. Then it exits.

In the meantime, I added the following lines to the script for some more testing (please note the fully qualified filename of the executable :) )

Are you sure, the script has all the necessary infos when runningas a cron script?You are aware, that within cron scripts, you have to load the userprofile explicitly or you won't have a proper environment?

_________________Please do not use private mail (PN/M) to ask questions. Use the proper forum instead. (me)

If there is no verified backup of a dataset, the dataset, by definition, is unimportant. (c't 2012)

you have to load the userprofile explicitly or you won't have a proper environment?

What do you mean with this? Do I have to source e.g. ~/.bashrc within the script that is startet by cron?Maybe it's important to say that:1) it is a user crontab starting the script, not /etc/crontab2) the script worked without problems when I used Win shares as destination paths, i.e.

(EDIT: The config-file was written and still is true for scripts using Win-shares as destination, so the error-messages within the config-files may be wrong for this very script. All the other variables should be ok for either versions.)

Sorry, but it may be a completely different cause, becauseyou are running Cygwin on a Windows Server Environment.

Check if "/var/log" and "/var/log/bkp_hmail_data.log" hassufficient user rights (read: is read- and writeable for everyone).Check if bash can really be accessed via /bin/bash. You areusing this in the shebang line.

For everything else, I can't help, because I have absolutely noclue of neither Windows Server OS nor Cygwin specialities.Sorry.

_________________Please do not use private mail (PN/M) to ask questions. Use the proper forum instead. (me)

If there is no verified backup of a dataset, the dataset, by definition, is unimportant. (c't 2012)

Anyone else with an idea? What kenatonline says is of course true: Cygwin tries to map Unix privileges to Windows privileges, which is not possible 1:1, so there might be a reason for this problem. But as the script is running flawlessly from (Cygwin-) commandline, but not as (Cygwin-) cron job, I think I have to look for a solution in cron direction.

PS (for future support):

Quote:

Check if "/var/log" and "/var/log/bkp_hmail_data.log" hassufficient user rights (read: is read- and writeable for everyone).Check if bash can really be accessed via /bin/bash

My script is running, and the mentioned log file is full of success messages before I switched to accessing the destination path by ssh and full of error messages afterwards. So all of these questions can be answered with yes. But to be sure, I checked it again:

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum