Bug 139209 - GPG unable to create keyring directory
Summary: GPG unable to create keyring directory
Alias: None
Product: Fedora
Classification: Fedora
Component: gnupg   
(Show other bugs)
Version: 3
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact:
: 146167 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2004-11-14 01:00 UTC by Aaron Kurtz
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

Fixed In Version: 1.2.7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-07-11 03:39:40 UTC
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-17 01:07 UTC, David Shaw
no flags Details | Diff

Description Aaron Kurtz 2004-11-14 01:00:50 UTC
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-17 01:07:23 UTC
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 16:10:41 UTC
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 23:56:45 UTC
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 12:29:16 UTC
Thank you for the workaround, RHEL4 contain also 1.2.6:


Comment 5 Peter Bieringer 2005-03-30 12:30:45 UTC
BTW, permissions are not proper in suggestion:
-chmod 500 .gnupg/gpg.conf
+chmod 600 .gnupg/gpg.conf

Comment 6 Nalin Dahyabhai 2005-07-29 20:12:59 UTC
*** Bug 146167 has been marked as a duplicate of this bug. ***

Comment 7 Matthew Miller 2006-07-10 21:21:08 UTC
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 21:24:05 UTC
At current version in FC5 is fixed.

Comment 9 Matthew Miller 2006-07-11 03:39:40 UTC
marking fixed as per comment #8.

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