Created
November 30, 2020 17:06
-
-
Save folliehiyuki/6a21d319f580f8a344b05eb015e5dd30 to your computer and use it in GitHub Desktop.
Correct gnupg permission
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
#!/bin/bash | |
# This fixes the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error while using Gnupg | |
# Make sure that the .gnupg directory and its contents is accessibile by your user. | |
chown -R $(whoami) "${GNUPGHOME:-$HOME/.gnupg}/" | |
# Also correct the permissions and access rights on the directory | |
chmod 600 "${GNUPGHOME:-$HOME/.gnupg}/*" | |
chmod 700 "${GNUPGHOME:-$HOME/.gnupg}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment