Environment
i386, Linux 2.6.12.3, Debian unstable, self-compiled gnupg 1.4.1, ...
Description
command "gpg --check-trustdb" fails to check the trustdb if user has no write permission on the directory the keyring lives in:
$ TMPDIR=/tmp gpg --check-trustdb
[...]
gpg: can't create `/usr/share/keyrings/debian-keyring.gpg.tmp': Permission denied gpg: failed to rebuild keyring cache: file open error gpg: can't create `/usr/share/keyrings/debian-keyring.pgp.tmp': Permission denied gpg: failed to rebuild keyring cache: file open error
[...]
How To Repeat
place keyring in directory without user write permissions:
gpg --check-trustdb
Fix
honor $TMPDIR if set, otherwise use /tmp