Trying to save my keyrings on a different location fails - pubring.gpg and secring.gpg updated/stored in .gnupg

JavierJJ's Avatar

JavierJJ

02 Jun, 2014 08:34 PM

GPGMail Version: 2.1 (Build 601)
GPG Keychain Access Version: 1.1.3 (Build 601)
GPGServices Version: 1.9.2 (Build 602)
MacGPG2 Version 2.0.22 Build 602
GPGPreferences Version 1.0.2 Build 602

I'm trying to use GPG on Mac but I don't want the program data to be stored on ~/.gnupg/ but rather on another directory

I come from Windows where that was a matter of adding/changing a registry entry.
In this case, what I've done is symlink the files in .gnupg to the new location:

trustdb.gpg -> /destination/folder/GnuPG/trustdb.gpg
secring.gpg -> /destination/folder/GnuPG/secring.gpg
random_seed -> /destination/folder/GnuPG/random_seed
pubring.gpg~ -> /destination/folder/GnuPG/pubring.gpg~
pubring.gpg -> /destination/folder/GnuPG/pubring.gpg
private-keys-v1.d -> /destination/folder/GnuPG/private-keys-v1.d/

The problem is that when the db is changed, it looks like new files are written (and the symlinks removed), so that I end up with a non-updated db in the original location, and a new one under my home folder.

Please describe what you did expect instead

I expected the symlink to be "respected" and thus the files to be really written in the destination folder. Maybe it would work if I use hard links? In windows you could set a per-user setting in the registry that would point the GPG programs in the right direction, but how would you do that in Mac?

If you remember, please describe the steps leading up to the problem.
Steps described above - basically create a symlink to the files in a different folder within the .gnupg folder

  1. Support Staff 1 Posted by Mento on 04 Jun, 2014 03:30 PM

    Mento's Avatar

    Hi!

    You need to symlink the whole GnuPG folder, like this:

    ln -s /destination/folder/GnuPG ~/.gnupg
    

    Regards, Mento

  2. 2 Posted by JavierJJ on 06 Jun, 2014 10:43 AM

    JavierJJ's Avatar

    Duh! It makes all kinds of sense and it's vastly easier than trying to do it piecemeal as I was attempting to do!

    Thanks a lot!

    Javier

  3. Support Staff 3 Posted by Steve on 09 Jun, 2014 02:44 PM

    Steve's Avatar

    Perfect. Glad, this is solved for you. I'm closing this discussion. If you need further assistance or have questions you can re-open this discussion here or open a new one any time.

    Also we've a ticket to implement an UI option to do this for the user, to simplify the process: https://gpgtools.lighthouseapp.com/projects/65684-gpg-keychain-acce...

    Best, steve

  4. Steve closed this discussion on 09 Jun, 2014 02:44 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac