gpg works on command line but not in crontab

August 24, 2006 – 23:02 | LAMP

This command:

CODE:
  1. gpg -r myself@digizenstudio.com --encrypt somefile

works on command line but when being put in crontab (it's supposed to encrypt the daily backup and ftp to my hosting provider's backup server). In the latter case it produces this error:

gpg: myself@digizenstudio.com: skipped: public key not found
gpg: /path/to/thebackup.gz: encryption failed: public key not found

The solution is to add "--homedir /root/.gpg" to the gpg command above.

Trackback from your site, or follow the comments in RSS.

Post a Comment