gnupg problems
Info
info@padre.at
Thu Aug 1 21:11:02 2002
gpg --version
gpg (GnuPG) 1.0.7
Linux 2.2.19 #7 SMP Sat Nov 10 05:35:28 CET 2001 i686 unknown unknown
GNU/Linux
i did a simply script which reads a file "cleartext" saved by a cgi script
my script just reads this text files encrypts it and send its via mail to
rcpt.
--few line of this script---
open(GPG, "cat $file |gpg --batch --quiet --output - --encrypt --textmode
--armor --always-trust -r domi|");
while(<GPG>) {
print MALI;
}
close(GPG);
---end----
as far this is working _fine_ if i start this script via shell!!!
But if i start this script from my cgi everything running as "www-data" id
33 i just get a error entry to apache-ssl error.log:gpg: fatal: ~/.gnupg:
can't create directory: No such file or directory
secmem usage: 0/0 bytes in 0/0 blocks of pool 0/16384
--------------
I'll get the mail but the gpg part is empty :-(
please see the strace attached.
Is it possible that the kernel cant handle this ~
strace part ----------------
[pid 16315] 20:42:17.718832 stat64("~/.gnupg/options", 0x7ffff17c) = -1 ENOSYS
(Function not implemented)
[pid 16315] 20:42:17.718906 stat("~/.gnupg/options", 0x7ffff0fc) = -1 ENOENT
(No such file or directory)
[pid 16315] 20:42:17.719066 open("~/.gnupg/options", O_RDONLY|O_LARGEFILE) =
-1 ENOENT (No such file or directory)
[pid 16315] 20:42:17.719183 stat("~/.gnupg", 0x7ffff0fc) = -1 ENOENT (No such
file or directory)
[pid 16315] 20:42:17.719262 getuid() = 33
[pid 16315] 20:42:17.719314 geteuid() = 33
[pid 16315] 20:42:17.719372 getgid() = 33
[pid 16315] 20:42:17.719428 getegid() = 33
[pid 16315] 20:42:17.719550 write(2, "gpg: ", 5gpg: ) = 5
[pid 16315] 20:42:17.719628 write(2, "Warning: using insecure memory!\n",
32Warning: using insecure memory!
) = 32
[pid 16315] 20:42:17.719712 write(2, "gpg: ", 5gpg: ) = 5
[pid 16315] 20:42:17.719777 write(2, "please see http://www.gnupg.org/"...,
62please see http://www.gnupg.org/faq.html for more information
) = 62
[pid 16315] 20:42:17.719861 stat("~/.gnupg/random_seed", 0x7ffff0ec) = -1
ENOENT (No such file or directory)
[pid 16315] 20:42:17.719945 stat("~/.gnupg/secring.gpg", 0x7ffff0bc) = -1
ENOENT (No such file or directory)
[pid 16315] 20:42:17.720023 open("~/.gnupg/secring.gpg", O_RDONLY|O_LARGEFILE)
= -1 ENOENT (No such file or directory)
[pid 16315] 20:42:17.720104 access("~/.gnupg/secring.gpg", F_OK) = -1 ENOENT
(No such file or directory)
[pid 16315] 20:42:17.720182 access("~/.gnupg", F_OK) = -1 ENOENT (No such file
or directory)
[pid 16315] 20:42:17.720259 mkdir("~/.gnupg", 0700) = -1 ENOENT (No such file
or directory)
[pid 16315] 20:42:17.720368 write(2, "gpg: fatal: ", 12gpg: fatal: ) = 12
[pid 16315] 20:42:17.720440 write(2, "~/.gnupg: can\'t create directory"...,
60~/.gnupg: can't create directory: No such file or directory
) = 60
[pid 16315] 20:42:17.720521 write(2, "secmem usage: 0/0 bytes in 0/0 b"...,
54secmem usage: 0/0 bytes in 0/0 blocks of pool 0/16384
) = 54
greetz from
Austria