Bug 139209 - GPG unable to create keyring directory
GPG unable to create keyring directory
Product: Fedora
Classification: Fedora
Component: gnupg (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
: 146167 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2004-11-13 20:00 EST by Aaron Kurtz
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
Fixed In Version: 1.2.7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-07-10 23:39:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Fix for homedir creation problem (2.41 KB, patch)
2004-11-16 20:07 EST, David Shaw
no flags Details | Diff

  None (edit)
Description Aaron Kurtz 2004-11-13 20:00:50 EST
Description of problem:
When GPG is first run it can't create keyring

Version-Release number of selected component (if applicable):

How reproducible:
Run gpg as a user without a ~/.gnupg directory

Steps to Reproduce:
1. Remove ~/.gnupg directory
2. Run gpg to create keyring
Actual results:
Unable to create keyring

Expected results:
Creation of ~/.gnupg directory and keyring

Additional info:
Example of failure

gpg: failed to create temporary file
`/home/dragoon/.gnupg/.#lk0xf70059a8.rydia.hardsun.net.4339': No such
file or directory
gpg: keyblock resource `/home/dragoon/.gnupg/secring.gpg': general error
gpg: failed to create temporary file
`/home/dragoon/.gnupg/.#lk0xf7005cb8.rydia.hardsun.net.4339': No such
file or directory
gpg: keyblock resource `/home/dragoon/.gnupg/pubring.gpg': general error
gpg: Go ahead and type your message ...

Once .gnupg directory is created GPG creates keyring without problem.
Comment 1 David Shaw 2004-11-16 20:07:23 EST
Created attachment 106864 [details]
Fix for homedir creation problem

Here is a patch, which will be part of GnuPG 1.2.7 (and 1.4) to resolve this
Comment 2 David Shaw 2004-12-30 11:10:41 EST
Note that 1.2.7 has been released which resolves this bug, as well as
bug #138266 and bug #142206
Comment 3 Oisin C. Feeley 2005-01-23 18:56:45 EST
As of 23rd Jan 2005 this is still an issue with a fully updated Fedora
Core 3 system.

The version of GPG is
[ush@ars ~]$ rpm -q gnupg
[us@ars ~] yum search gnupg
gnupg.i386                               1.2.6-1                base
Matched from:

I assume that the correct thing for users to do is to:
cd ~
mkdir .gnupg
cp /usr/share/gnupg/options.skel .gnupg/gpg.conf
chmod 700 .gnupg
chmod 500 .gnupg/gpg.conf
chown <user>.<user> .gnupg
chown <user>.<user> .gnupg/gpg.conf

It'd be nice to have some confirmation of this being the correct thing
to do until version 1.2.7 is released as an update.

Comment 4 Peter Bieringer 2005-03-30 07:29:16 EST
Thank you for the workaround, RHEL4 contain also 1.2.6:

Comment 5 Peter Bieringer 2005-03-30 07:30:45 EST
BTW, permissions are not proper in suggestion:
-chmod 500 .gnupg/gpg.conf
+chmod 600 .gnupg/gpg.conf
Comment 6 Nalin Dahyabhai 2005-07-29 16:12:59 EDT
*** Bug 146167 has been marked as a duplicate of this bug. ***
Comment 7 Matthew Miller 2006-07-10 17:21:08 EDT
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.

Thank you!
Comment 8 Peter Bieringer 2006-07-10 17:24:05 EDT
At current version in FC5 is fixed.
Comment 9 Matthew Miller 2006-07-10 23:39:40 EDT
marking fixed as per comment #8.

Note You need to log in before you can comment on or make changes to this bug.