# Unsafe permissions on .gnupg

## gsoe

Today I suddenly got this message from gnupg, when I was trying to run kgpg:

 *Quote:*   

> unsafe permissions on homedir '/home/gert/.gnupg

 

The permissions were

```
newpc .gnupg # ls -l

totalt 2412

-rw------- 1 username username      42 22 jan  2013 gpg-agent.conf

-rw-r--r-- 1 username username     348 14 jun  2015 gpg.conf

-rw-r--r-- 1 username username     371 27 feb  2011 gpg.conf.gpgconf.bak

drwx------ 2 username username    4096 11 okt 20:26 private-keys-v1.d

-rw------- 1 username username 1200290 24 mar  2014 pubring.gpg

-rw------- 1 username username 1200290 24 mar  2014 pubring.gpg~

-rw-r--r-- 1 username username   27224 20 feb  2011 pubring.kbx

-rw------- 1 username username     600 15 sep 15:41 random_seed

-rw------- 1 username username    1522 11 jun  2012 secring.gpg

-rw------- 1 username username    1400 24 mar  2014 trustdb.gpg

-rw------- 1 username username     959 14 jun  2015 trustlist.txt

```

I changed all filepermissions to 600 and directories to 700, which solved the problem. Unfortunately I dont know if gnupg has been changed to accept only stricter permissions, so an update caused the problem, or if the permissions somehow got altered. But I notice that the private-keys-v1.d directory was altered two days ago. I did actually use gnupg at that time, but should that cause an alteration of private-keys-v1.d?

Any cause for concern?

----------

## toralf

gnupg 2.1.5 wants 0700 on ~/.gnupg

----------

## gsoe

Thanks toralf. In the meantime I got the idea to look at 

```
newpc app-crypt # ls -l /usr/portage/app-crypt/ | grep gnupg

drwxr-xr-x 3 root root 4096 11 okt 10:42 gnupg

drwxr-xr-x 2 root root 4096  4 jun 09:47 gnupg-pkcs11-scd

```

Seems I updated to 2.1.15 two days ago at 10:42, that might account for for the "unsafe permissions" part. But I used kgpg at 20:26 without seeing the problem. Should that be possible given that KDE had been running all day with kgpg open in the background?

----------

## toralf

 *gsoe wrote:*   

> Seems I updated to 2.1.15 two days ago

 

```
qlop --gauge --human --list --unlist gnupg
```

tells you such things

----------

## gsoe

Thanks again. Never heard of qlop before.

----------

