Unsurprisingly, the two environments you have listed there differ in the value of $HOME. Crypt::GPG uses this to find the keyrings, so if the keys aren't present on root's keyring, it won't stand a chance.
In reply to Re^3: Script works when run with sudo, but not when run directly as root...?
by hippo
in thread Script works when run with sudo, but not when run directly as root...?
by bmalnad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |