Skip to content

Instantly share code, notes, and snippets.

View nnelas's full-sized avatar

Nuno Nelas nnelas

View GitHub Profile
@oseme-techguy
oseme-techguy / Correct_GnuPG_Permission.sh
Last active April 28, 2024 04:37
This fixes the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error while using Gnupg .
#!/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