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)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay