Mailing List Archive

CGI encryption (again)
Thanks everyone for you earlier suggestions. I've tried several
methods, but the most promising was Jack McKinney's suggestion that I
create a directory for the web server user. This I have done, even
logging in as that user and importing the keys and everything from
the command line as the web server user ('nobody', in this case).
When logged on as 'nobody' I can create keys and encrypt on keys I've
imported. But as soon as i have my CGI script try it, it tells me:

gpg: fatal: ~/.gnupg: can't create directory: No such file or directory

I've checked to make sure that there's a .gnupg directory already,
and that it, and everything in it, is readable by 'nobody', but
nothing can get rid of this error in my web server log. This is
really getting out of hand. Any help would be appreciated.


Erik Wessel
STREET | CANCE
MARKETING COMMUNICATIONS
233 North Water Street
Milwaukee WI 53202
ph 414 | 765 | 0333
fax 414 | 765 | 1207

--
Archive is at http://lists.gnupg.org - Unsubscribe by sending mail
with a subject of "unsubscribe" to gnupg-users-request@gnupg.org
Re: CGI encryption (again) [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----

Big Brother tells me that Erik Wessel wrote:
> Thanks everyone for you earlier suggestions. I've tried several
> methods, but the most promising was Jack McKinney's suggestion that I
> create a directory for the web server user. This I have done, even
> logging in as that user and importing the keys and everything from
> the command line as the web server user ('nobody', in this case).
> When logged on as 'nobody' I can create keys and encrypt on keys I've
> imported. But as soon as i have my CGI script try it, it tells me:
>
> gpg: fatal: ~/.gnupg: can't create directory: No such file or directory

~ is a shell alias for $HOME. If this environment variable is not
set, then gpg will fail. Try running this cgi:

#!/usr/bin/perl

print "Content-type: text/html\n\n";
print "<TABLE BORDER=1>\n";
while(($k,$v) = each %ENV)
{
print "<TR><TD>$k</TD><TD>$v</TD></TR>\b";
}
print "</TABLE>\n";
exit 0;

If you do not see HOME listed, then you'll probably need to set
it in your script. In Perl, do:

$ENV{"HOME"} = "/usr/local/www"; # or whatever your user nobody homedir is.

- --
"The pellet with the poison's Jack McKinney
in the vessel with the pestle, jackmc@lorentz.com
the chalice from the palace http://www.lorentz.com
has the brew that is true."
F4 A0 65 67 58 77 AF 9B FC B3 C5 6B 55 36 94 A6

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBOcqDPkZx0BGJTwrZAQHfWwP9HBY2ywTMG8AMt0zwGjWchkZCXhi0L65W
Eg8HkO1G4rs4lSSa0r4GNZjwnhdVg/HqKnhHQT2YT+MeGcinjJxI3oGZ4u4FgjBD
Mdajz9GmyD61+y9NisBFFMx/BiB6/4CtnqWJeju7ZwBhiW75oq3v44zsus0AAhK6
bZrkx5cEK20=
=UjI2
-----END PGP SIGNATURE-----

--
Archive is at http://lists.gnupg.org - Unsubscribe by sending mail
with a subject of "unsubscribe" to gnupg-users-request@gnupg.org