CGI encryption (again)

Jack McKinney
Thu, 21 Sep 2000 16:53:07 -0500


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, the chalice from the palace 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 - Unsubscribe by sending mail with a subject of "unsubscribe" to