in reply to Re^2: Script works when run with sudo, but not when run directly as root...?
in thread Script works when run with sudo, but not when run directly as root...?

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.

  • Comment on Re^3: Script works when run with sudo, but not when run directly as root...?