3

I am unable to access my OpenPGP keys on Seahorse. I tried to create a new key but the key never appeared (though it did prompt me for details). After trying to create a new keyring none of the keys were showing. I also reinstalled Seahorse.

When I do gpg --list-keys all the keys are listed and they also appear in seahorse when I sudo seahorse. However I am unable to access the files through the context menu (it says I dont have the decryption keys). When I attempt to import the keys from /home/####/.gnupg/pubring.gpg permission is denied.

Any suggestions on how to access these files?

Also I need to transfer some of these locked files onto another Ubuntu machine. If I create a new key with the same private key (I mean the passphrase I normally use to open the files on this machine) will I be able to open them?

My ~/.gnupg directory:

 drwx------ 3 bill bill 4096 Sep 13 23:28 .
 drwxr-xr-x 59 bill bill 4096 Sep 13 23:25 ..
 -rw------- 1 bill bill 9398 Jul 7 00:14 gpg.conf
 drwx------ 2 bill bill 4096 Sep 13 22:31 private-keys-v1.d
 -rw------- 1 root root 334311 Sep 13 22:17 pubring.gpg
 -rw------- 1 root root 334311 Sep 13 22:17 pubring.gpg~
 -rw------- 1 bill bill 600 Sep 13 22:42 random_seed
 -rw------- 1 root root 7645 Sep 13 22:17 secring.gpg
 -rw------- 1 bill bill 1520 Sep 13 22:17 trustdb.gpg
  • What user are you running gpg as? Run ls -la ~/.gnupg to check the permissions. – Jens Erat Sep 13 '14 at 15:39
  • total 696 drwx------ 3 bill bill 4096 Sep 13 23:28 . drwxr-xr-x 59 bill bill 4096 Sep 13 23:25 .. -rw------- 1 bill bill 9398 Jul 7 00:14 gpg.conf drwx------ 2 bill bill 4096 Sep 13 22:31 private-keys-v1.d -rw------- 1 root root 334311 Sep 13 22:17 pubring.gpg -rw------- 1 root root 334311 Sep 13 22:17 pubring.gpg~ -rw------- 1 bill bill 600 Sep 13 22:42 random_seed -rw------- 1 root root 7645 Sep 13 22:17 secring.gpg -rw------- 1 bill bill 1520 Sep 13 22:17 trustdb.gpg – grek0 Sep 13 '14 at 15:55
  • Please don't put such follow-up content into comments (and in this case, format as code), but edit your question instead. In the comments, its barely readable. – Jens Erat Sep 13 '14 at 15:57
  • so sorry for that – grek0 Sep 13 '14 at 16:10
3

The problem is that you ran GnuPG as root at some time, and it created your keyring files with root being the owner:

 -rw------- 1 root root 334311 Sep 13 22:17 pubring.gpg
 -rw------- 1 root root 334311 Sep 13 22:17 pubring.gpg~
 -rw------- 1 root root 7645 Sep 13 22:17 secring.gpg

Run sudo chown -r bill:bill /home/bill/.gnupg (user folder guessed from user name) to repair the file ownership.

  • I used sudo "chown -R bill:bill /home/bill/.gnupg" which worked fine. Thanks a lot – grek0 Sep 13 '14 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.