gpg --gen-key fails

Henry Hertz Hobbit hhhobbit at securemecca.net
Fri Oct 13 02:44:40 CEST 2006


Others wrote:

>> Try:
>> $ ls -ld ~ ~/.gnupg/

>> What are your permissions? Do you have rwx for .gnupg?

>> drwx------ 164 hgr hgr 12288 Oct 12 23:45 /home/hgr
>> drwx------   3 hgr hgr  4096 Oct 12 15:26 /home/hgr/.gnupg/

Okay. That looks okay. Try the following:

$ cd ; cd .gnupg

# if that doesn't work you may have something like SELinux that can
# be causing the problem.  If you make it into .gnupg type:

$ ls -al

# if that works type:

$ touch empty_file
$ ls -al
$ rm -f empty_file
$ chmod 600 *.gpg*
$ chmod 600 random_seed
$ ls -al
$ umask

# if all of that that works (your umask should be 077 or 0077), type:

$ which gpg
# change to the directory (usually either /usr/bin or /usr/local/bin)
# where gpg is at and then type
ls -l gpg*

Here is what I have:

$ ls -l gpg*
-rwsr-xr-x  1 root root 742760 Apr 16 03:45 gpg
-rwsr-xr-x  1 root root  31068 Apr 16 03:46 gpgsplit
-rwsr-xr-x  1 root root 265548 Apr 16 03:45 gpgv
-rwxr-xr-x  1 root root   3374 Apr 16 03:44 gpg-zip

Please, no snickers about it being so old. You get the mode of
the files that way by either sudo'ing it or su'ing to root and
typing:

# cd to where the files are at.
chmod 4755 gpg*

If you have gone through all of this with no problems, it is NOT a
file system problem.  What I am doing is isolating away the gpg
and looking at the file system itself.  Even if your default umask
is 027 (0027), you should set it to 077 when working with
encryption.

HHH



More information about the Gnupg-users mailing list