How to preserve the permission/owner/group owner on the pubring.gpg, secring.gpg and trustdb.gpg

Werner Koch wk at
Thu Aug 7 11:32:29 CEST 2014

On Wed,  6 Aug 2014 20:35, peter at said:

> Alternatively, and I'm not really in favour of this but it's your setup,
> the man-pages for gpg and gpg2 mention:
>> --preserve-permissions

Oops.  I forgot about this option despite that I looked at the code

    statbuf.st_mode=S_IRUSR | S_IWUSR;

    if (((secret && !opt.preserve_permissions)
         || !stat (bakfname,&statbuf)) 
        && !chmod (fname,statbuf.st_mode))

Nevertheless, I concur with Peter's assessment.



Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

More information about the Gnupg-users mailing list