GPG & Perl
Anthony E . Greene
agreene@pobox.com
Fri Mar 2 00:29:10 2001
On Thu, 01 Mar 2001 11:08:09 Adam Knowles wrote:
>Newbiemail here. I'm trying to swap from PGP to GPG for sending out e-mail
>from a Perl script running on a website. This is probably more of a Perl
>question than a GPG question, but if anyone can help I'd be eternally
>grateful!! Otherwise I may have to install PGP :-( and continue using it,
>which is less legal.
Not a good idea. Those folks work hard and expect to get paid. If we want
people to respect the GPL, we need to respect their licenses.
>Am I right in thinking that Perl executes CGI scripts as the user who owns
>the script?
No. Scripts execute using the UID of the user that ran the script, not the
owner. CGI scripts execute as the httpd user.
>If so, my problem may be that the user who own the script does not have a
>.gnupg directory or keyring on the system. I've set GNUPGHOME to
>/etc/httpd/.gnupg which is the location of the keyring for the HTTPD user.
man gpg:
--homedir directory
Set the name of the home directory to directory
If this option is not used it defaults to
"~/.gnupg". It does not make sense to use this
in a options file. This also overrides the envi
ronment variable "GNUPGHOME".
>1) The HTTPD user does not have the rights to execute CGI scripts
If so, that's unusual. Regardless, you should be able to define the GPG home
directory using the GNUPGHOME environment variable or the --homedir option
on the command line. The httpd user may need to be able to write to this
directory.
Tony
--
Anthony E. Greene <agreene@pobox.com> <http://www.pobox.com/~agreene/>
PGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26 C484 A42A 60DD 6C94 239D
Chat: AOL/Yahoo: TonyG05 ICQ: 91183266
Linux. The choice of a GNU Generation. <http://www.linux.org/>