DEV Community

Ahmy Yulrizka
Ahmy Yulrizka

Posted on • Originally published at til.yulrizka.com

1

Fix gpg: WARNING: unsafe permissions on homedir

When you copy gpg configuration form other machine, you might get warning as follow

gpg: WARNING: unsafe permissions on homedir '/home/user/.gnupg'
Enter fullscreen mode Exit fullscreen mode

To fix this, make sure that The .gnupg directory has the correct permission.

chown -R $(whoami) ~/.gnupg/
Enter fullscreen mode Exit fullscreen mode

And files & folder inside has the correct permisson

find ~/.gnupg -type f -exec chmod 600 {} \; # Set 600 for files
find ~/.gnupg -type d -exec chmod 700 {} \; # Set 700 for directories
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay