Menu

Cannot Connect to gpg-agent

Bruce Jala
2014-10-13
2014-10-18
  • Bruce Jala

    Bruce Jala - 2014-10-13

    I have installed Linux Mint 1.7 on an old Dell laptop with Thunderbird 31.1.2 as an email client with Enigmail. When I use setup wizzard to generate a key pair, the installation hangs up, and the debugging log file gives the following report below. As additional information, when I run Synaptic Package Mgr, I see the following packages installed:
    1) gnupg 1.4.16-1 ubuntu2.1
    2) libgpgmell 1.43-0.1 ubuntu5.1
    3) gpgv 1.4.16-1ubuntu2.1
    4) Enigmail 2:1.7-0 ubuntu0.14
    5) gnupg2 2.0.22-3 ubuntu1.1
    6 gnupg-curl 1.4.16-1 ubuntu2.1
    7) ubuntu-keyring 2012.05.19
    8) gnupg-agent 2.0.22-3 ubuntu1.1

    Any suggestions on how to fix this problem?

    enigmail> /usr/bin/gpg --charset utf-8 --display-charset utf-8 --batch --no-tty --status-fd 2 --with-fingerprint --fixed-list-mode --with-colons --list-secret-keys
    gpg: failed to create temporary file /home/bruce/.gnupg/.#lk0x9b818d0.bruce-MM061.11203': Permission denied gpg: keyblock resource/home/bruce/.gnupg/secring.gpg': general error
    gpg: failed to create temporary file /home/bruce/.gnupg/.#lk0x9b81880.bruce-MM061.11203': Permission denied gpg: keyblock resource/home/bruce/.gnupg/pubring.gpg': general error
    gpg: can't access /home/bruce/.gnupg/trustdb.gpg': Permission denied gpg: fatal: can't init trustdb: trust database error secmem usage: 0/0 bytes in 0/0 blocks of pool 0/32768 enigmail> /usr/bin/gpg --charset utf-8 --display-charset utf-8 --batch --no-tty --status-fd 2 --with-fingerprint --fixed-list-mode --with-colons --list-secret-keys gpg: failed to create temporary file/home/bruce/.gnupg/.#lk0x91e88d0.bruce-MM061.11207': Permission denied
    gpg: keyblock resource /home/bruce/.gnupg/secring.gpg': general error gpg: failed to create temporary file/home/bruce/.gnupg/.#lk0x91e8880.bruce-MM061.11207': Permission denied
    gpg: keyblock resource /home/bruce/.gnupg/pubring.gpg': general error gpg: can't access/home/bruce/.gnupg/trustdb.gpg': Permission denied
    gpg: fatal: can't init trustdb: trust database error
    secmem usage: 0/0 bytes in 0/0 blocks of pool 0/32768
    enigmail> /usr/bin/gpg --charset utf-8 --display-charset utf-8 --batch --no-tty --status-fd 2 -t --clearsign -u Bjala@Comcast.net --use-agent
    enigmail> /usr/bin/gpg --charset utf-8 --display-charset utf-8 --batch --no-tty --status-fd 2 --with-fingerprint --fixed-list-mode --with-colons --list-secret-keys
    gpg: failed to create temporary file /home/bruce/.gnupg/.#lk0x85288d0.bruce-MM061.11223': Permission denied gpg: keyblock resource/home/bruce/.gnupg/secring.gpg': general error
    gpg: failed to create temporary file /home/bruce/.gnupg/.#lk0x8528880.bruce-MM061.11223': Permission denied gpg: keyblock resource/home/bruce/.gnupg/pubring.gpg': general error
    gpg: can't access /home/bruce/.gnupg/trustdb.gpg': Permission denied gpg: fatal: can't init trustdb: trust database error secmem usage: 0/0 bytes in 0/0 blocks of pool 0/32768 enigmail> /usr/bin/gpg --charset utf-8 --display-charset utf-8 --batch --no-tty --status-fd 2 -t --clearsign -u <Bjala@Comcast.net> --use-agent enigmail> /usr/bin/gpg --charset utf-8 --display-charset utf-8 --batch --no-tty --status-fd 2 --with-fingerprint --fixed-list-mode --with-colons --list-secret-keys gpg: failed to create temporary file/home/bruce/.gnupg/.#lk0x87a78d0.bruce-MM061.11237': Permission denied
    gpg: keyblock resource /home/bruce/.gnupg/secring.gpg': general error gpg: failed to create temporary file/home/bruce/.gnupg/.#lk0x87a7880.bruce-MM061.11237': Permission denied
    gpg: keyblock resource /home/bruce/.gnupg/pubring.gpg': general error gpg: can't access/home/bruce/.gnupg/trustdb.gpg': Permission denied
    gpg: fatal: can't init trustdb: trust database error
    secmem usage: 0/0 bytes in 0/0 blocks of pool 0/32768

     
  • Patrick Brunschwig

    I'd say that gpg cannot write to the directory /home/bruce/.gnupg/ - you should ensure that the directory is writable for yourself ....

     
    • Bruce Jala

      Bruce Jala - 2014-10-14

      Thanks Patrick. Do you have any quick or easy suggestions on how to do that, or is it a more involved process? Should I consult a book on Unix to find out how to do this?

       
  • Ludwig Hügelschäfer

    This is about basic Unix/Linux file/directory permissions. They are wrong for your .gnupg directory.

    To repair this, open a command shell (bash, zsh, etc.) and type

    cd
    chmod u+w .gnupg
    

    this should do it.

     
  • Bruce Jala

    Bruce Jala - 2014-10-18

    Ludwig,
    I opened a Terminal window, and entered that command. This is the result of that operation.

    chmod: changing permissions of '.gnupg': operation not permitted

    Any suggestions as to what I should try next?

     
  • Ludwig Hügelschäfer

    What's going on there? Obviously, you are not the owner of your .gnupg directory.

    What's the output of

    cd
    whoami
    ls -al .gnupg

     
  • Bruce Jala

    Bruce Jala - 2014-10-18

    Here is the screen output:

    bruce@bruce-MM061 ~ $ cd
    bruce@bruce-MM061 ~ $ whoami
    bruce
    bruce@bruce-MM061 ~ $ ls-al.gnupg
    ls-al.gnupg: command not found
    bruce@bruce-MM061 ~ $ ls -al .gnupg
    ls: cannot open directory .gnupg: Permission denied
    bruce@bruce-MM061 ~ $

    What do I try now?

     
  • Ludwig Hügelschäfer

    cd
    sudo ls -al .gnupg

     
  • Bruce Jala

    Bruce Jala - 2014-10-18

    bruce@bruce-MM061 ~ $ cd
    bruce@bruce-MM061 ~ $ sudo ls -al .gnupg
    [sudo] password for bruce:
    total 72
    drwx------ 2 root root 4096 Oct 4 10:45 .
    drwx------ 31 bruce bruce 4096 Oct 18 14:31 ..
    -rw------- 1 root root 9398 Oct 4 10:44 gpg.conf
    -rw------- 1 root root 2184 Oct 4 10:45 pubring.gpg
    -rw------- 1 root root 2184 Oct 4 10:45 pubring.gpg~
    -rw------- 1 root root 0 Oct 4 10:44 secring.gpg
    -rw------- 1 root root 1200 Oct 4 10:45 trustdb.gpg
    bruce@bruce-MM061 ~ $

    ??

     
  • Ludwig Hügelschäfer

    Ah, ok. Your .gnupg directory is owned by the user root. Did you call gpg the first time as root (by prepending "sudo") to the command line? Is there another user on your computer knowing the root password?

    Anyway: To fix this, please enter the following commands:

    cd
    sudo chown -R bruce:bruce .gnupg

    This should transfer ownership of .gnupg and the containing files to user bruce, group bruce.

    Afterwards

    ls -al .gnupg

    should yield the following output:

    total 72
    drwx------ 2 bruce bruce 4096 Oct 4 10:45 .
    drwx------ 31 bruce bruce 4096 Oct 18 14:31 ..
    -rw------- 1 bruce bruce 9398 Oct 4 10:44 gpg.conf
    -rw------- 1 bruce bruce 2184 Oct 4 10:45 pubring.gpg
    -rw------- 1 bruce bruce 2184 Oct 4 10:45 pubring.gpg~
    -rw------- 1 bruce bruce 0 Oct 4 10:44 secring.gpg
    -rw------- 1 bruce bruce 1200 Oct 4 10:45 trustdb.gpg

    and every gnupg and Enigmail operation should work now.

     
  • Bruce Jala

    Bruce Jala - 2014-10-18

    It worked!

    Thank you for your patience and help. Much appreciated!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.