From owner-freebsd-questions@FreeBSD.ORG Tue Oct 25 18:13:57 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E966F16A41F for ; Tue, 25 Oct 2005 18:13:56 +0000 (GMT) (envelope-from cp@web-walrus.com) Received: from mail814.megamailservers.com (mail814.carrierinternetsolutions.com [69.49.106.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8608943D46 for ; Tue, 25 Oct 2005 18:13:56 +0000 (GMT) (envelope-from cp@web-walrus.com) X-POP-User: webwalrus.clearwire.net Received: from 64.13.24.182 (64-13-24-182.ecl.clearwire-dns.net [64.13.24.182]) by mail814.megamailservers.com (8.13.1/8.13.1) with SMTP id j9PIDrCw003423 for ; Tue, 25 Oct 2005 14:13:55 -0400 From: Robert Wall To: X-Mailer: PocoMail 3.1 (1880) - Licensed Version Date: Tue, 25 Oct 2005 13:13:52 -0500 Message-ID: <20051025131352.217826@bob> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Crontab and GPG? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2005 18:13:57 -0000 Hello! I'm attempting to run GPG from cron, and it's not working. I can= run the script from the command line, and all works perfectly. When I try= to run it from cron, however, it doesn't work. The crontab calls this= script, called "pgpdecrypt" with the following crontab line: */1 * * * * root /bin/bash /etc/pgpdecrypt The /bin/bash wasn't originally there; I added it to make sure that the= script was using the correct shell. Still no luck. Here's the script that= it calls: echo >> /etc/pgpdecrypt.logger "PGP Decrypter Starting" cd /home/folder for filename in `ls *pgp` do gpg --batch --no-tty --passphrase-fd 0 --output= /home/folder/pgp-decrypted/$filename.txt --decrypt /home/folder/$filename <= /home/folder/pp /home/folder/pgp-decrypted/import.pl= /home/folder/pgp-decrypted/$filename.txt echo >> /etc/pgpdecrypt.logger "/home/folder/$filename= /home/folder/pgp-original/$filename" done The output file is cheerfully logging the filenames appropriately. = /var/log/messages doesn't contain any errors. Anybody got any ideas? Even= if I could get a competent logging mechanism in place to see why GPG= doesn't feel like running, that would be great. Any help would be greatly appreciated. Thanks!