Skip to content

Instantly share code, notes, and snippets.

View asakura42's full-sized avatar
🌲
scripting scripting bashing bashing loving leaving pulling pushing

asakura42

🌲
scripting scripting bashing bashing loving leaving pulling pushing
  • Japan
View GitHub Profile
@asakura42
asakura42 / Correct_GnuPG_Permission.sh
Last active November 27, 2020 01:32 — forked from oseme-techguy/Correct_GnuPG_Permission.sh
This fixes the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error while using Gnupg .
#!/bin/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) "${GNUPGHOME:-$HOME/.gnupg}/"
# Also correct the permissions and access rights on the directory
chmod 600 "${GNUPGHOME:-$HOME/.gnupg}/*"
chmod 700 "${GNUPGHOME:-$HOME/.gnupg}"