Can't Run GnuPG from CGI Script
Tue Sep 11 00:05:02 2001
I am getting the following error when trying to execute GnuPG from a cgi
gpg: fatal: ~/.gnupg: can't create directory: No such file or directory
secmem usage: 0/0 bytes in 0/0 blocks of pool 0/163
Here is the gpg command:
gpg --homedir /var/www/data/.gnupg $armor --always-trust --yes -o- -r
'987500C1' --no-tty --batch --encrypt /home/perluser/gpg/plain_text.txt
Shouldn't the "--homedir" option take care of this error?
It is being executed by user apache.
It works fine from the command line. It also works fine when executing it
by a different normal user from the command line.
Is anyone successfully using gpg in this way on a web server?
At 06:55 PM 9/7/2001 -0500, you wrote:
>pd, at 12:37 -0400 on Fri, 7 Sep 2001, wrote:
> I have written the following two Unix shell scripts to be executed from
> perl scripts. It works fine from the command line but when I try to
> get it
> to execute from a web page it refuses. gpg reports no error, it *acts*
> like it is running, there is no system error returned, but it does
>You want to add options such as --no-tty and --batch
>You might want to look into the Perl module GnuPG::Interface instead of
>using shell scripts; it could be much safer.
>Frank Tobin http://www.neverending.org/~ftobin/
>Gnupg-users mailing list
I have now installed Crypt::GPG and am using it to interface with
GnuPG. It still acts the same way when trying to execute gpg by user
"apache" from the cgi-bin directory.
Any help would be *much* appreciated.