Yet another PHP/GPG Problem

Adam Rhodes
Sun Mar 23 00:30:01 2003


I am currently writing a fairly extensive suite of tools in PHP, and one
of the last parts of the project involves signing an email with GPG. Two
weeks ago I only vaguely knew what GPG stood for, so please bare with

My problem is (hopefully) fairly simple, and from what I have read has
been answered many times before, but after 2 hours of searching I have
been unable to solve it. Any help is greatly appreciated.

I have finally managed to create one line of code which gives the output
I am after (an out.txt file) when I run it from the command line. This
line works fine under both my user and root, and therefore I'm guessing
my override of the .gnupg directory is working fine. 
However, as soon as I place this within a .php file and call it from the
web, the output file fails to appear. From what I have read on these
lists, its something to do with a permissions problem, with the fact
that apache is running as 'nobody'. However, I cannot for the life of me
work out what the problem is. I have gone overly drastic and chmoded the
.gnupg directory to 777 temporarily, and I am confident that the output
directory is writable by apache (I can create files/folders in this
directory from within scripts without problems).

Does anybody happen to have an easy answer to this? I apologise in
advance if this is an obvious answer that I've missed, but I'm pulling
my hair out over it as to why I'm getting no output. I'm fairly certain
it is due to the 'nobody' user problem however.

Adam Rhodes