Pgp Problem

View: New views
5 Messages — Rating Filter:   Alert me  

Parent Message unknown Pgp Problem

by M Schwab :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 Dear list-lurkers,

I'm asking for your support with this issue:

While I'm trying to generate a PGP-Key in Horde, I have to wait some Minutes untill I'm getting a Apache2-Error-Message (internal Server error). This command is executed while I have to wait for the error message:


/usr/bin/gpg --no-tty --no-secmem-warning --no-options --no-default-keyring --yes --homedir /var/www/domain.de/tmp//z8npl9wl --output /var/www/domain.de/tmp/z8npl9wl/horde-pgpfLdIm5 --quiet --gen-key --batch --armor

The key-files in /var/www/domain.de/tmp/z8npl9wl/ are generated correctly, but they're not shown in Horde because I got an internal error first.

I'm using Debian (stable), Apache2 and PHP5 with suExec/fcgid.
I'm not sure if this is a Horde or an Apache problem, but maybe you can help me anyway. Many thanks in advance for any hints.


Thanks,

Manuel


Here are  some strace debug messages I'm getting while I'm running the command above from CLI:

/usr/bin/gpg --debug-all --no-secmem-warning --no-options
--no-default-keyring --yes --homedir
/var/www/domain.de/tmp//1zfhag4l --output
/var/www/domain.de/tmp/1zfhag4l/horde-pgpiTPkU3 --gen-key
--batch --armor
gpg: WARNUNG: Unsicheres Besitzverhältnis des Home-Verzeichnis
`/var/www/domain.de/tmp//1zfhag4l'
gpg: DBG: iobuf-1.0: open `[stdin]' fd=0
gpg: DBG: iobuf-1.0: ioctl `file_filter(fd)' no_cache=1
gpg: DBG: iobuf-1.0: underflow: req=8192

--------------------------------------------------------

# strace /usr/bin/gpg --debug-all --no-secmem-warning
--no-options --no-default-keyring --yes --homedir
/var/www/domain.de/tmp//1zfhag4l --output
/var/www/domain.de/tmp/1zfhag4l/horde-pgpiTPkU3 --gen-key
--batch --armor
execve("/usr/bin/gpg", ["/usr/bin/gpg", "--debug-all",
"--no-secmem-warning", "--no-options", "--no-default-keyring", "--yes",
"--homedir", "/var/www/domain.de/tmp//"..., "--output",
"/var/www/domain.de/tmp/1"..., "--gen-key", "--batch",
"--armor"], [/* 17 vars */]) = 0
brk(0)                                  = 0xb0d000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7f1bc7b5e000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7f1bc7b5c000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=19199, ...}) = 0
mmap(NULL, 19199, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f1bc7b57000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
open("/lib/libresolv.so.2", O_RDONLY)   = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\00003\0\0\0\0\0\0@"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=72568, ...}) = 0
mmap(NULL, 2177800, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7f1bc7730000
mprotect(0x7f1bc7740000, 2097152, PROT_NONE) = 0
mmap(0x7f1bc7940000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f1bc7940000
mmap(0x7f1bc7942000, 6920, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f1bc7942000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
open("/usr/lib/libz.so.1", O_RDONLY)    = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@!\0\0\0\0\0\0@"..., 832)
= 832
fstat(3, {st_mode=S_IFREG|0644, st_size=93504, ...}) = 0
mmap(NULL, 2188616, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7f1bc7519000
mprotect(0x7f1bc752f000, 2097152, PROT_NONE) = 0
mmap(0x7f1bc772f000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7f1bc772f000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
open("/lib/libbz2.so.1.0", O_RDONLY)    = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0
\27\0\0\0\0\0\0@"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=66320, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7f1bc7b56000
mmap(NULL, 2161616, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7f1bc7309000
mprotect(0x7f1bc7318000, 2093056, PROT_NONE) = 0
mmap(0x7f1bc7517000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe000) = 0x7f1bc7517000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
open("/lib/libreadline.so.5", O_RDONLY) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20M\1\0\0\0\0\0@"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=258616, ...}) = 0
mmap(NULL, 2359040, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7f1bc70c9000
mprotect(0x7f1bc7101000, 2093056, PROT_NONE) = 0
mmap(0x7f1bc7300000, 32768, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x37000) = 0x7f1bc7300000
mmap(0x7f1bc7308000, 3840, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f1bc7308000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\16\0\0\0\0\0\0@"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14616, ...}) = 0
mmap(NULL, 2109728, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7f1bc6ec5000
mprotect(0x7f1bc6ec7000, 2097152, PROT_NONE) = 0
mmap(0x7f1bc70c7000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f1bc70c7000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
open("/lib/libusb-0.1.so.4", O_RDONLY)  = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\31\0\0\0\0\0\0@"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=32608, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7f1bc7b55000
mmap(NULL, 2128016, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7f1bc6cbd000
mprotect(0x7f1bc6cc4000, 2093056, PROT_NONE) = 0
mmap(0x7f1bc6ec3000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f1bc6ec3000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\342\1\0\0\0\0\0@"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1375536, ...}) = 0
mmap(NULL, 3482232, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7f1bc696a000
mprotect(0x7f1bc6ab4000, 2093056, PROT_NONE) = 0
mmap(0x7f1bc6cb3000, 20480, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x149000) = 0x7f1bc6cb3000
mmap(0x7f1bc6cb8000, 17016, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f1bc6cb8000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
open("/lib/libncurses.so.5", O_RDONLY)  = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320%\1\0\0\0\0\0@"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=256288, ...}) = 0
mmap(NULL, 2353152, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7f1bc672b000
mprotect(0x7f1bc6766000, 2093056, PROT_NONE) = 0
mmap(0x7f1bc6965000, 20480, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3a000) = 0x7f1bc6965000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7f1bc7b54000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7f1bc7b53000
arch_prctl(ARCH_SET_FS, 0x7f1bc7b536e0) = 0
mprotect(0x7f1bc6cb3000, 12288, PROT_READ) = 0
munmap(0x7f1bc7b57000, 19199)           = 0
fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
brk(0)                                  = 0xb0d000
brk(0xb2e000)                           = 0xb2e000
setrlimit(RLIMIT_CORE, {rlim_cur=0, rlim_max=0}) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {0x42f6d0, [], SA_RESTORER, 0x7f1bc699bf60}, NULL,
8) = 0
rt_sigaction(SIGHUP, NULL, {SIG_DFL}, 8) = 0
rt_sigaction(SIGHUP, {0x42f6d0, [], SA_RESTORER, 0x7f1bc699bf60}, NULL,
8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTERM, {0x42f6d0, [], SA_RESTORER, 0x7f1bc699bf60}, NULL,
8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {0x42f6d0, [], SA_RESTORER, 0x7f1bc699bf60}, NULL,
8) = 0
rt_sigaction(SIGSEGV, NULL, {SIG_DFL}, 8) = 0
rt_sigaction(SIGSEGV, {0x42f6d0, [], SA_RESTORER, 0x7f1bc699bf60}, NULL,
8) = 0
rt_sigaction(SIGUSR1, {0x42f510, [], SA_RESTORER, 0x7f1bc699bf60}, NULL,
8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
open("/usr/lib/locale/locale-archive", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2950576, ...}) = 0
mmap(NULL, 2950576, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f1bc645a000
close(3)                                = 0
mmap(NULL, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7f1bc7b4b000
getuid()                                = 0
mlock(0x7f1bc7b4b000, 32768)            = 0
getuid()                                = 0
geteuid()                               = 0
access("/var/www/domain.de/tmp//1zfhag4l/gpg.conf-1.4.9", R_OK)
= -1 ENOENT (No such file or directory)
access("/var/www/domain.de/tmp//1zfhag4l/gpg.conf-1.4", R_OK) =
-1 ENOENT (No such file or directory)
access("/var/www/domain.de/tmp//1zfhag4l/gpg.conf-1", R_OK) = -1
ENOENT (No such file or directory)
access("/var/www/domain.de/tmp//1zfhag4l/gpg.conf", R_OK) = -1
ENOENT (No such file or directory)
access("/var/www/domain.de/tmp//1zfhag4l/options", R_OK) = -1
ENOENT (No such file or directory)
stat("/var/www/domain.de/tmp//1zfhag4l", {st_mode=S_IFDIR|0700,
st_size=4096, ...}) = 0
stat("/var/www/domain.de/tmp/", {st_mode=S_IFDIR|0750,
st_size=835584, ...}) = 0
getuid()                                = 0
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2586, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7f1bc7b5b000
read(3, "# Locale name alias data base.\n# "..., 4096) = 2586
read(3, ""..., 4096)                    = 0
close(3)                                = 0
munmap(0x7f1bc7b5b000, 4096)            = 0
open("/usr/share/locale/de_DE.UTF-8/LC_MESSAGES/gnupg.mo", O_RDONLY) =
-1 ENOENT (No such file or directory)
open("/usr/share/locale/de_DE.utf8/LC_MESSAGES/gnupg.mo", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/share/locale/de_DE/LC_MESSAGES/gnupg.mo", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/share/locale/de.UTF-8/LC_MESSAGES/gnupg.mo", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/share/locale/de.utf8/LC_MESSAGES/gnupg.mo", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/share/locale/de/LC_MESSAGES/gnupg.mo", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=147085, ...}) = 0
mmap(NULL, 147085, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f1bc7b27000
close(3)                                = 0
open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=25700, ...}) = 0
mmap(NULL, 25700, PROT_READ, MAP_SHARED, 3, 0) = 0x7f1bc7b20000
close(3)                                = 0
write(2, "gpg: "..., 5gpg: )                 = 5
write(2, "WARNUNG: Unsicheres Besitzverh\303\244l"..., 102WARNUNG:
Unsicheres Besitzverhältnis des Home-Verzeichnis
`/var/www/domain.de/tmp//1zfhag4l'
) = 102
access("/var/www/domain.de/tmp//1zfhag4l/random_seed", F_OK) = 0
open("/var/www/domain.de/tmp//1zfhag4l/secring.gpg", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7f1bc7b5b000
read(3, ""..., 4096)                    = 0
close(3)                                = 0
munmap(0x7f1bc7b5b000, 4096)            = 0
access("/var/www/domain.de/tmp//1zfhag4l/secring.gpg", F_OK) = 0
open("/var/www/domain.de/tmp//1zfhag4l/pubring.gpg", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7f1bc7b5b000
read(3, ""..., 4096)                    = 0
close(3)                                = 0
munmap(0x7f1bc7b5b000, 4096)            = 0
access("/var/www/domain.de/tmp//1zfhag4l/pubring.gpg", F_OK) = 0
stat("/var/www/domain.de/tmp//1zfhag4l/secring.gpg",
{st_mode=S_IFREG|0600, st_size=0, ...}) = 0
stat("/var/www/domain.de/tmp//1zfhag4l/pubring.gpg",
{st_mode=S_IFREG|0600, st_size=0, ...}) = 0
write(2, "gpg: DBG: "..., 10gpg: DBG: )           = 10
write(2, "iobuf-1.0: open `[stdin]' fd=0\n"..., 31iobuf-1.0: open
`[stdin]' fd=0
) = 31
write(2, "gpg: DBG: "..., 10gpg: DBG: )           = 10
write(2, "iobuf-1.0: ioctl `file_filter(fd)"..., 46iobuf-1.0: ioctl
`file_filter(fd)' no_cache=1
) = 46
write(2, "gpg: DBG: "..., 10gpg: DBG: )           = 10
write(2, "iobuf-1.0: underflow: req=8192\n"..., 31iobuf-1.0: underflow:
req=8192
) = 31
read(0, ^C <unfinished ...>



--
Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: horde-unsubscribe@...

Re: Pgp Problem

by Roberto Maurizzi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>
> read(0, ^C <unfinished ...>
>

It seems the program waits for some interactive input, but then it gets
terminated, probably due to timeout.

If you execute the command from a prompt do you get a input request?

Ciao,
  Roberto
--
Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: horde-unsubscribe@...

Re: Pgp Problem

by Peter Meier-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

>> read(0, ^C <unfinished ...>
>>
>
> It seems the program waits for some interactive input, but then it gets
> terminated, probably due to timeout.
>
> If you execute the command from a prompt do you get a input request?

as entropy is generally slow on servers, keygeneration can take very  
long and can run into php-timeout. You should tweak this seeting, as  
well to look for an entropy generator on your server.

we have quite good experience with:  
http://freshmeat.net/projects/clrngd/ but be aware that this entropy  
isn't that random as it would come from a hardware random generator.

cheers pete
--
Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: horde-unsubscribe@...

Re: Pgp Problem

by M Schwab :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Pete,
I checked out clrngd. Nice tool but without any effects for my problem.
 
Cheers!


-----Ursprüngliche Nachricht-----

> Von: Peter Meier <peter.meier@...>
> An: roberto.maurizzi@...
> Cc: manuel.schwab@..., horde@...
> Gesendet: 6.10.'09,  14:12
>
> Hi
>
>>> read(0, ^C <unfinished ...>
>>>
>>
>> It seems the program waits for some interactive input, but then it gets
>> terminated, probably due to timeout.
>>
>> If you execute the command from a prompt do you get a input request?
>
> as entropy is generally slow on servers, keygeneration can take very long and can run into php-timeout. You should tweak this seeting, as well to look for an entropy generator on your server.
>
> we have quite good experience with: http://freshmeat.net/projects/clrngd/ but be aware that this entropy isn't that random as it would come from a hardware random generator.
>
> cheers pete

--
Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: horde-unsubscribe@...

Re: Pgp Problem

by M Schwab :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Roberto,

but I don't. I just can press ^C.

This occurs after reading pubring.gpg but the two existing files pubring.gpg and secring.gpg does have zero bytes. Could this cause the problem?

Thanks,
Manuel

-----Ursprüngliche Nachricht-----

> Von: Roberto Maurizzi <roberto.maurizzi@...>
> An: manuel.schwab@...
> Cc: horde@...
> Gesendet: 6.10.'09,  11:40
>
>> read(0, ^C <unfinished ...>
>>
> It seems the program waits for some interactive input, but then it gets terminated, probably due to timeout.
>
> If you execute the command from a prompt do you get a input request?
>
> Ciao,
>   Roberto
>

--
Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: horde-unsubscribe@...