Esteemed experts,
Any GNUPG experts out there?
I've acquired the task of encrypting a file with gpg.
This must take place within a script that is run as a
cron process.
The script I've created works perfectly when run from a
command line. When run as a cron process, it acts as
though the line that creates the encrypted file is
simply skipped over. There is no trace of any output,
error or otherwise. The .gpg file is never created.
Sparing you the details of the script, the essence of
what it does is this:
echo $(</path/to/file) | gpg --passphrase-fd=0 --symmetric thefile
There's lots of stuff before and after. Never mind what
it does. It all works.
Yes, I'm aware that the man page says don't use
--passphrase-fd if it can be avoided. Assume that it
can't be.
I've tried *everything* I know for the past two days to
try to figure out what's going on, to no avail. The
only thing I can guess is that because it runs as a
cron process, cron does something funny with the file
descriptors. Or else cron is possessed by an evil
spirit.
I tried also --passphrase-fd=- in case file descriptor
zero is explicitly somehow something different from
stdin at that point, though I don't see how it could
be. Didn't work. Grasping at straws at this point.
Help!? Many thanks.
--
Lynn David Newton
Phoenix, AZ
... a.k.a. clueless on a Friday morning
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss