gpg: WARNING: unsafe ownership on homedir

Branko Majic branko at
Tue Jun 4 22:43:09 CEST 2013

On Tue, 4 Jun 2013 19:22:04 +0000
<Ira.Kirschner at> wrote:

> I have researched this error message and have found the suggestions do not work. Does anyone know how to have this warning message stop?
> I am getting the message:   gpg: WARNING: unsafe ownership on homedir `/home/wsc_gpg/.gnupg'
> User wsc_gpg owns the gpg installation.
> The process is running from root as:
> sudo -u wsc_gpg cat /home/wsc_gpg/.gnupg/cache.txt | gpg --homedir /home/wsc_gpg/.gnupg --batch --yes --no-mdc-warning --skip-verify --passphrase-fd 0 --no-secmem-warning -o $OUTPUTFILE -d $ENCRYPTEDFILE

Ok, so the catch here is that the first command in the line is being
run as user wsc_gpg, but not the subsequent ones. You want want to put
a sudo -u wsc_gpg in front of the second gpg command in the pipeline as
well (otherwise it'll still run as root, and gpg will complain
about .gnupg directory not being owned by root).

Best regards

Branko Majic
Jabber: branko at
Please use only Free formats when sending attachments to me.

Бранко Мајић
Џабер: branko at
Молим вас да додатке шаљете искључиво у слободним форматима.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: </pipermail/attachments/20130604/64ac50e0/attachment.sig>

More information about the Gnupg-users mailing list