BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] rsync issue
- Subject: [Discuss] rsync issue
- From: invalid at pizzashack.org (Derek Martin)
- Date: Mon, 14 Nov 2022 18:11:55 -0600
- In-reply-to: <Y2V0oK3Lf3fFfuX4@alphacent.localdomain>
- References: <Y2V0oK3Lf3fFfuX4@alphacent.localdomain>
On Fri, Nov 04, 2022 at 04:22:56PM -0400, dan moylan wrote: > BUT -- here's another little oddity. it works fine from the > command line prompt, but not in a cron script (where i want to > use it). it works in the cron script on aldeberan. The cron angle is an important detail that you left out of your original message. OpenSSH commands use the environment (specifically SSH_AUTH_SOCK) to tell each other how to access your SSH agent. Your cron job normally has no access to your user environment (it would need to be a child of the shell that started your agent, which it will never be), so it has no idea how to find your agent. So the odd part here is that it works on aldeberan. For that to work, you would need something fairly hacky so that your cron job knows how to find your agent. Hopefully that's enough for you to figure it out, because there's no one obvious "normal" way to do this--whatever you did to make it work on aldeberan would necessarily be specific to you and your environment. One thing I noted is that your !# line (from the script you pasted, first message) uses /bin/bash rather than /bin/sh. This causes a behavior difference which is IMO a bit sinister due to likely being unexpected: It causes your .bashrc file to be sourced, *even from shell scripts*, whereas /bin/sh does not. I have a suspicion that your .bashrc does something funky with SSH_AUTH_SOCK on the machine where it works, that's missing from the machine where it does not. If that's not it, I can only wish you the best of luck finding whatever it is... =8^) -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02 -=-=-=-=- This message is posted from an invalid address. Replying to it will result in undeliverable mail due to spam prevention. Sorry for the inconvenience.
- References:
- [Discuss] rsync issue
- From: jdm at moylan.us (dan moylan)
- [Discuss] rsync issue
- Prev by Date: [Discuss] Boston Linux VIRTUAL Meeting , Wednesday, November 16, 2022 - Retrocomputing Tour
- Next by Date: [Discuss] mimencode for Fedora
- Previous by thread: [Discuss] rsync issue
- Next by thread: [Discuss] Music Server/Player
- Index(es):