GPG error - can't open `patrick.asc' [Solved]

Instructions state the following steps to take:

  1. gpg --fingerprint
    I got:

gpg: new configuration file /home/xxx/.gnupg/gpg.conf' created gpg: WARNING: options in /home/xxx/.gnupg/gpg.conf’ are not yet active during this run
gpg: keyring `/home/xxx/.gnupg/pubring.gpg’ created
gpg: /home/xxx/.gnupg/trustdb.gpg: trustdb created

  1. chmod --recursive og-rwx ~/.gnupg
    I got prompt back with no error.

  2. Download Patrick Schleizer’s (adrelanos’) OpenPGP key:
    patrick.asc and store it as ~/patrick.asc.

  3. gpg --with-fingerprint patrick.asc
    I got error:

gpg: keyring /home/xxx/.gnupg/secring.gpg' created gpg: can't open patrick.asc’

What is wrong?

Good day,

Could you maybe check whether you have full read Access to that Directory? Also maybe try redownloading the key.

Have a nice day,

Ego

Thanks for the quick reply.

Yes, I did have full read access.

But I went to the directory and changed the settings to include group as well as user for read and write, and made it recursive.

I again ran “gpg --with-fingerprint patrick.asc”.

Then I got:

gpg: WARNING: unsafe permissions on configuration file /home/xxx/.gnupg/gpg.conf' gpg: WARNING: unsafe enclosing directory permissions on configuration file /home/xxx/.gnupg/gpg.conf’
gpg: can’t open `patrick.asc’

Where was patrick.asc supposed to be placed?

Either in your home folder. And then run from your home folder

gpg --with-fingerprint patrick.asc

Or anywhere and then use.

gpg --with-fingerprint /path/to/patrick.asc

Then it should have worked from home/xxx/.gnupg/patrick.asc.

Anyone have any ideas? Is there a better installation routine defined anywhere?

home/xxx/.gnupg/patrick.asc

Missing /

/home/xxx/.gnupg/patrick.asc

Try.

ls -la /home/xxx/.gnupg/patrick.asc

Does that work?

Then the gpg command should also work.

Yes, it did. It returned:

-rwxrw---- 1 xxx xxx 40677 Mar 3 16:01 /home/xxx/.gnupg/patrick.asc

Then gpg --with-fingerprint patrick.asc returned:

gpg: WARNING: unsafe permissions on configuration file /home/xxx/.gnupg/gpg.conf' gpg: WARNING: unsafe enclosing directory permissions on configuration file /home/xxx/.gnupg/gpg.conf’
gpg: can’t open `patrick.asc’

gpg --with-fingerprint /home/xxx/.gnupg/patrick.asc

Well, that’s a little different. It returned:

gpg: WARNING: unsafe permissions on configuration file /home/xxx/.gnupg/gpg.conf' gpg: WARNING: unsafe enclosing directory permissions on configuration file /home/xxx/.gnupg/gpg.conf’
pub 4096R/2EEACCDA 2014-01-16 Patrick Schleizer adrelanos@riseup.net
Key fingerprint = 916B 8D99 C38E AF5E 8ADC 7A2A 8D66 066A 2EEA CCDA
sub 4096R/CE998547 2014-01-16 [expires: 2021-04-17]
sub 4096R/119B3FD6 2014-01-16 [expires: 2021-04-17]
sub 4096R/77BB3C48 2014-01-16 [expires: 2021-04-17]

Is that what we’re looking for?

Yes.

Problem was you invented putting the key into /home/xxx/.gnupg/. That’s not a problem if you know your paths but not what was suggested in documentation.

Oh, I see.

I’m still a little worried about the insecurity issues. As I said earlier, I may have made a mistake in my settings. What should they be?

In which settings?

My third post above.

Not a security concern. Unless a multi user system. Not a Whonix question. It’s a gpg usage question.

If you like to sort that out please go through the gnupg help channels as per Free Support for Whonix ™.

Thank you for your help. I needed it. Have a good day.

1 Like