0

Recently I happend to experience a quite unpleasant power outage which caused my system to go down unexpectadly. After power came back the system came back as well and other than a fsck being required all seemed fine. The unedifying surprise hit me when I first tried to access my pass password store - it complained about gpg being broken; so I checked with plain

gpg

and got this:

gpg: failed to create temporary file `/home/meUser/.gnupg/.#lk0x14368b8.meBox.13459': Not a directory
gpg: keyblock resource `/home/meUser/.gnupg/secring.gpg': general error
gpg: failed to create temporary file `/home/meUser/.gnupg/.#lk0x14379f0.meBox.13459': Not a directory
gpg: keyblock resource `/home/meUser/.gnupg/pubring.gpg': general error

Does this mean that gnupg is broken on my system now or is this something user specific? I guess my password store is gone, just wondering how to fix gpg to set up a new store.

4
  • are you sure fsck completed successfully?
    – casey
    Jan 23, 2015 at 20:28
  • What is the output of ls -ld /home/meUser/.gnupg? Jan 23, 2015 at 20:29
  • @casey: fixed some inodes to lost+found, other than that: yes.
    – KB22
    Jan 23, 2015 at 20:31
  • @HaukeLaging: srwx----wT 33542 2147486432 3626238453 1093671686 Mar 22 1951 /home/meUser/.gnupg
    – KB22
    Jan 23, 2015 at 20:31

1 Answer 1

2

Your folder /home/meUser/.gnupg is gone. You have to restore it from lost+found or backup.

8
  • of course I managed not to have a backup of that, also have looked into restoring from lost and found. as I have a hard copy of the passwords I'd rather just create a new store. how can I fix .gnupg? just delete dir .gnupg and run gpg?
    – KB22
    Jan 23, 2015 at 20:37
  • 1
    @KB22 Not to have a backup of the keyrings seems crazy. What do you mean with "hard copy of the passwords"? If you delete /home/meUser/.gnupg and run gpg afterwards it should recreate the folder with an empty public and private keyring and trust database. Jan 23, 2015 at 20:41
  • not much to bring up in my defense as far backup is concerned. Hard Copy: piece of paper, passwords written on it. gpg fixed as you described - thanks! one more thing: seem to be unable to delete .password-store - getting rm: cannot remove `.password-store/vpn/someThing.gpg': Operation not permitted even with sudo
    – KB22
    Jan 23, 2015 at 20:46
  • The reasons I know for nor being able to delete are (1) file system errors, (2) SELinux, AppArmor and the like, (3) file system attributes: lsattr .password-store/vpn/someThing.gpg`. Jan 23, 2015 at 20:50
  • lsattr: Operation not supported While reading flags on - tried to chmod it to 0755. Not permitted either.
    – KB22
    Jan 23, 2015 at 20:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .