Forked from oseme-techguy/Correct_GnuPG_Permission.sh
Created
January 13, 2023 09:29
-
-
Save Ali-RS/a1b06c679b6f8a260384e2494a6c7410 to your computer and use it in GitHub Desktop.
This fixes the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error while using Gnupg .
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error | |
# Make sure that the .gnupg directory and its contents is accessibile by your user. | |
chown -R $(whoami) ~/.gnupg/ | |
# Also correct the permissions and access rights on the directory | |
chmod 600 ~/.gnupg/* | |
chmod 700 ~/.gnupg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment