Skip to content

Instantly share code, notes, and snippets.

@oseme-techguy
Last active September 30, 2025 04:22
Show Gist options
  • Save oseme-techguy/bae2e309c084d93b75a9b25f49718f85 to your computer and use it in GitHub Desktop.
Save oseme-techguy/bae2e309c084d93b75a9b25f49718f85 to your computer and use it in GitHub Desktop.

Revisions

  1. oseme-techguy renamed this gist Apr 9, 2019. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. oseme-techguy created this gist Apr 9, 2019.
    9 changes: 9 additions & 0 deletions Correct_GnuPg_Permission.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    #!/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