~/.gnupg problem: gpg: WARNING: unsafe ownership on homedir - unable to change permissionsExecute vs Read...

Programming of ICs in general (MCU / FPGA / Serdes IC)

Why are Tucker and Malcolm not dead?

Iteratively increasing network size during training

Flood on the top floor

Why command hierarchy, if the chain of command is standing next to each other?

First amendment and employment: Can a police department terminate an officer for speech?

Is it okay for a ticket seller to grab a tip in the USA?

Why is Python 2.7 still the default Python version in Ubuntu?

Generate Brainfuck for the numbers 1–255

What can Amex do if I cancel their card after using the sign up bonus miles?

What kind of liquid can be seen 'leaking' from the upper surface of the wing of a Boeing 737-800?

Website error: "Walmart can’t use this browser"

Translation of "I don't have anything to smile about"

Can sampling rate be a floating point number?

How make an image of my entire usb flash drive?

What are these funnel-looking green things in my yard?

Corroded Metal vs Magical Armor, should it melt it?

Does the rule that you cannot willingly end your move in another creature's space force or prevent certain actions?

How is являться different from есть and быть

What is the purpose of doing this exercice with humming?

Why aren't rainbows blurred-out into nothing after they are produced?

80's/90's superhero cartoon with a man on fire and a man who made ice runways like Frozone

Why does my purified Pokémon need to be healed?

Why aren't rockets built with truss structures inside their fuel & oxidizer tanks to increase structural strength?



~/.gnupg problem: gpg: WARNING: unsafe ownership on homedir - unable to change permissions


Execute vs Read bit. How do directory permissions in Linux work?Problem building GPGControlling ftp access with vsftpdCannot change ownership of folder owned by nobodygnupg: Getting errors trying to gpg --gen-keyWhat are the standard ownership settings for files in the `.gnupg` folder?gpg: WARNING: unsafe ownership on homedir '/home/user/.gnupg'Folder group ownership permissions and problems






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I keep getting this message with the following command:



$ chown -R $(whoami) ~/.gnupg/
chown: changing ownership of '/home/chh1/.gnupg/pubring.kbx': Permission denied
chown: changing ownership of '/home/chh1/.gnupg/pubring.kbx~': Permission denied
chown: cannot access '/home/chh1/.gnupg/openpgp-revocs.d': Permission denied
chown: cannot access '/home/chh1/.gnupg/private-keys-v1.d': Permission denied
chown: changing ownership of '/home/chh1/.gnupg/trustdb.gpg': Permission denied
chown: changing ownership of '/home/chh1/.gnupg/random_seed': Permission denied
chown: cannot access '/home/chh1/.gnupg/.gnupg': Permission denied


But when I run:



sudo chmod 600 ~/.gnupg
sudo ls -la .gn*


I get:



drw-------  5 chh1 chh1 4096 Aug 13 11:52 .
drwxr-xr-x 32 chh1 chh1 4096 Aug 13 11:52 ..
drwxr-xr-x 4 chh1 chh1 4096 May 20 12:43 .gnupg
drwxr-xr-x 2 chh1 chh1 4096 May 20 12:53 openpgp-revocs.d
drwx------ 2 chh1 chh1 4096 May 20 12:53 private-keys-v1.d
-rw-r--r-- 1 chh1 chh1 1967 May 20 12:53 pubring.kbx
-rw-r--r-- 1 chh1 chh1 32 May 20 12:53 pubring.kbx~
-rw-r--r-- 1 chh1 chh1 600 Aug 12 22:09 random_seed
-rw-r--r-- 1 chh1 chh1 1280 May 20 12:53 trustdb.gpg


So why have the permissions for .gnupg not changed and why do I need root access to list the content.



If I run



$ gpg --list-keys
gpg: failed to create temporary file '/home/chh1/.gnupg/.#lk0x0000549b32cfd9e6.chh1.3876': Permission denied
gpg: keyblock resource '/home/chh1/.gnupg/pubring.kbx': Permission denied
gpg: failed to create temporary file '/home/chh1/.gnupg/.#lk0x000055b32cfde340.chh1.3876': Permission denied
gpg: Fatal: can't create lock for '/home/chh1/.gnupg/trustdb.gpg'


If I run the same command with sudo I get:



gpg: WARNING: unsafe ownership on homedir '/home/chh1/.gnupg'
/home/chh1/.gnupg/pubring.kbx


I have no clue how to fix this and appreciate some help on the matter.










share|improve this question









New contributor



Christian Hick is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






















  • The permissions did change. You set them to 0600, and now it's drw-------. Why did you set a directory's permission to 0600? You need execute permissions on directories: unix.stackexchange.com/questions/21251/…

    – muru
    18 hours ago


















0















I keep getting this message with the following command:



$ chown -R $(whoami) ~/.gnupg/
chown: changing ownership of '/home/chh1/.gnupg/pubring.kbx': Permission denied
chown: changing ownership of '/home/chh1/.gnupg/pubring.kbx~': Permission denied
chown: cannot access '/home/chh1/.gnupg/openpgp-revocs.d': Permission denied
chown: cannot access '/home/chh1/.gnupg/private-keys-v1.d': Permission denied
chown: changing ownership of '/home/chh1/.gnupg/trustdb.gpg': Permission denied
chown: changing ownership of '/home/chh1/.gnupg/random_seed': Permission denied
chown: cannot access '/home/chh1/.gnupg/.gnupg': Permission denied


But when I run:



sudo chmod 600 ~/.gnupg
sudo ls -la .gn*


I get:



drw-------  5 chh1 chh1 4096 Aug 13 11:52 .
drwxr-xr-x 32 chh1 chh1 4096 Aug 13 11:52 ..
drwxr-xr-x 4 chh1 chh1 4096 May 20 12:43 .gnupg
drwxr-xr-x 2 chh1 chh1 4096 May 20 12:53 openpgp-revocs.d
drwx------ 2 chh1 chh1 4096 May 20 12:53 private-keys-v1.d
-rw-r--r-- 1 chh1 chh1 1967 May 20 12:53 pubring.kbx
-rw-r--r-- 1 chh1 chh1 32 May 20 12:53 pubring.kbx~
-rw-r--r-- 1 chh1 chh1 600 Aug 12 22:09 random_seed
-rw-r--r-- 1 chh1 chh1 1280 May 20 12:53 trustdb.gpg


So why have the permissions for .gnupg not changed and why do I need root access to list the content.



If I run



$ gpg --list-keys
gpg: failed to create temporary file '/home/chh1/.gnupg/.#lk0x0000549b32cfd9e6.chh1.3876': Permission denied
gpg: keyblock resource '/home/chh1/.gnupg/pubring.kbx': Permission denied
gpg: failed to create temporary file '/home/chh1/.gnupg/.#lk0x000055b32cfde340.chh1.3876': Permission denied
gpg: Fatal: can't create lock for '/home/chh1/.gnupg/trustdb.gpg'


If I run the same command with sudo I get:



gpg: WARNING: unsafe ownership on homedir '/home/chh1/.gnupg'
/home/chh1/.gnupg/pubring.kbx


I have no clue how to fix this and appreciate some help on the matter.










share|improve this question









New contributor



Christian Hick is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






















  • The permissions did change. You set them to 0600, and now it's drw-------. Why did you set a directory's permission to 0600? You need execute permissions on directories: unix.stackexchange.com/questions/21251/…

    – muru
    18 hours ago














0












0








0








I keep getting this message with the following command:



$ chown -R $(whoami) ~/.gnupg/
chown: changing ownership of '/home/chh1/.gnupg/pubring.kbx': Permission denied
chown: changing ownership of '/home/chh1/.gnupg/pubring.kbx~': Permission denied
chown: cannot access '/home/chh1/.gnupg/openpgp-revocs.d': Permission denied
chown: cannot access '/home/chh1/.gnupg/private-keys-v1.d': Permission denied
chown: changing ownership of '/home/chh1/.gnupg/trustdb.gpg': Permission denied
chown: changing ownership of '/home/chh1/.gnupg/random_seed': Permission denied
chown: cannot access '/home/chh1/.gnupg/.gnupg': Permission denied


But when I run:



sudo chmod 600 ~/.gnupg
sudo ls -la .gn*


I get:



drw-------  5 chh1 chh1 4096 Aug 13 11:52 .
drwxr-xr-x 32 chh1 chh1 4096 Aug 13 11:52 ..
drwxr-xr-x 4 chh1 chh1 4096 May 20 12:43 .gnupg
drwxr-xr-x 2 chh1 chh1 4096 May 20 12:53 openpgp-revocs.d
drwx------ 2 chh1 chh1 4096 May 20 12:53 private-keys-v1.d
-rw-r--r-- 1 chh1 chh1 1967 May 20 12:53 pubring.kbx
-rw-r--r-- 1 chh1 chh1 32 May 20 12:53 pubring.kbx~
-rw-r--r-- 1 chh1 chh1 600 Aug 12 22:09 random_seed
-rw-r--r-- 1 chh1 chh1 1280 May 20 12:53 trustdb.gpg


So why have the permissions for .gnupg not changed and why do I need root access to list the content.



If I run



$ gpg --list-keys
gpg: failed to create temporary file '/home/chh1/.gnupg/.#lk0x0000549b32cfd9e6.chh1.3876': Permission denied
gpg: keyblock resource '/home/chh1/.gnupg/pubring.kbx': Permission denied
gpg: failed to create temporary file '/home/chh1/.gnupg/.#lk0x000055b32cfde340.chh1.3876': Permission denied
gpg: Fatal: can't create lock for '/home/chh1/.gnupg/trustdb.gpg'


If I run the same command with sudo I get:



gpg: WARNING: unsafe ownership on homedir '/home/chh1/.gnupg'
/home/chh1/.gnupg/pubring.kbx


I have no clue how to fix this and appreciate some help on the matter.










share|improve this question









New contributor



Christian Hick is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I keep getting this message with the following command:



$ chown -R $(whoami) ~/.gnupg/
chown: changing ownership of '/home/chh1/.gnupg/pubring.kbx': Permission denied
chown: changing ownership of '/home/chh1/.gnupg/pubring.kbx~': Permission denied
chown: cannot access '/home/chh1/.gnupg/openpgp-revocs.d': Permission denied
chown: cannot access '/home/chh1/.gnupg/private-keys-v1.d': Permission denied
chown: changing ownership of '/home/chh1/.gnupg/trustdb.gpg': Permission denied
chown: changing ownership of '/home/chh1/.gnupg/random_seed': Permission denied
chown: cannot access '/home/chh1/.gnupg/.gnupg': Permission denied


But when I run:



sudo chmod 600 ~/.gnupg
sudo ls -la .gn*


I get:



drw-------  5 chh1 chh1 4096 Aug 13 11:52 .
drwxr-xr-x 32 chh1 chh1 4096 Aug 13 11:52 ..
drwxr-xr-x 4 chh1 chh1 4096 May 20 12:43 .gnupg
drwxr-xr-x 2 chh1 chh1 4096 May 20 12:53 openpgp-revocs.d
drwx------ 2 chh1 chh1 4096 May 20 12:53 private-keys-v1.d
-rw-r--r-- 1 chh1 chh1 1967 May 20 12:53 pubring.kbx
-rw-r--r-- 1 chh1 chh1 32 May 20 12:53 pubring.kbx~
-rw-r--r-- 1 chh1 chh1 600 Aug 12 22:09 random_seed
-rw-r--r-- 1 chh1 chh1 1280 May 20 12:53 trustdb.gpg


So why have the permissions for .gnupg not changed and why do I need root access to list the content.



If I run



$ gpg --list-keys
gpg: failed to create temporary file '/home/chh1/.gnupg/.#lk0x0000549b32cfd9e6.chh1.3876': Permission denied
gpg: keyblock resource '/home/chh1/.gnupg/pubring.kbx': Permission denied
gpg: failed to create temporary file '/home/chh1/.gnupg/.#lk0x000055b32cfde340.chh1.3876': Permission denied
gpg: Fatal: can't create lock for '/home/chh1/.gnupg/trustdb.gpg'


If I run the same command with sudo I get:



gpg: WARNING: unsafe ownership on homedir '/home/chh1/.gnupg'
/home/chh1/.gnupg/pubring.kbx


I have no clue how to fix this and appreciate some help on the matter.







ubuntu permissions gpg






share|improve this question









New contributor



Christian Hick is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question









New contributor



Christian Hick is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question








edited 13 hours ago









Kusalananda

159k18 gold badges316 silver badges502 bronze badges




159k18 gold badges316 silver badges502 bronze badges






New contributor



Christian Hick is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 19 hours ago









Christian HickChristian Hick

1




1




New contributor



Christian Hick is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




Christian Hick is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















  • The permissions did change. You set them to 0600, and now it's drw-------. Why did you set a directory's permission to 0600? You need execute permissions on directories: unix.stackexchange.com/questions/21251/…

    – muru
    18 hours ago



















  • The permissions did change. You set them to 0600, and now it's drw-------. Why did you set a directory's permission to 0600? You need execute permissions on directories: unix.stackexchange.com/questions/21251/…

    – muru
    18 hours ago

















The permissions did change. You set them to 0600, and now it's drw-------. Why did you set a directory's permission to 0600? You need execute permissions on directories: unix.stackexchange.com/questions/21251/…

– muru
18 hours ago





The permissions did change. You set them to 0600, and now it's drw-------. Why did you set a directory's permission to 0600? You need execute permissions on directories: unix.stackexchange.com/questions/21251/…

– muru
18 hours ago










1 Answer
1






active

oldest

votes


















-2














the solvings :



IN ANY case before doing this check your /home to verify With other user the needed permission



Check permission of
/home/chh1/



I. e. 
ususally for Debian its Set to
drwxr-xr-x 4 test test 9 Aug 2 09:56 test


to aproach this:



chmod 740 /home/chh1 && chmod +x /home/chh1
chown -R /home/chh1


Check gnupg folder



root@pve:~# cd  -la |grep gnupg
drwx------ 3 root root 6 Jul 12 15:39 .gnupg


this means only root and noone else can do anything



chmod -R 700 ~/gnupg


-R do it recursivly



and then fix the permission



drwx------  2 root root    2 Jul 12 15:39 private-keys-v1.d
-rw-r--r-- 1 root root 3426 Jul 12 15:39 pubring.kbx
-rw-r--r-- 1 root root 1069 Jul 12 15:39 pubring.kbx~
-rw------- 1 root root 1200 Jul 12 15:39 trustdb.gpg


the directory should already having this
the first and second file is 644 and the third is 600



please vote in case i could help






share|improve this answer




























  • cd -la |grep gnupg makes no sense. To view the permissions on a directory with ls, use ls -ld dir. Also, why are you running as root?

    – Kusalananda
    13 hours ago
















Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Christian Hick is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f535276%2fgnupg-problem-gpg-warning-unsafe-ownership-on-homedir-unable-to-change-p%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









-2














the solvings :



IN ANY case before doing this check your /home to verify With other user the needed permission



Check permission of
/home/chh1/



I. e. 
ususally for Debian its Set to
drwxr-xr-x 4 test test 9 Aug 2 09:56 test


to aproach this:



chmod 740 /home/chh1 && chmod +x /home/chh1
chown -R /home/chh1


Check gnupg folder



root@pve:~# cd  -la |grep gnupg
drwx------ 3 root root 6 Jul 12 15:39 .gnupg


this means only root and noone else can do anything



chmod -R 700 ~/gnupg


-R do it recursivly



and then fix the permission



drwx------  2 root root    2 Jul 12 15:39 private-keys-v1.d
-rw-r--r-- 1 root root 3426 Jul 12 15:39 pubring.kbx
-rw-r--r-- 1 root root 1069 Jul 12 15:39 pubring.kbx~
-rw------- 1 root root 1200 Jul 12 15:39 trustdb.gpg


the directory should already having this
the first and second file is 644 and the third is 600



please vote in case i could help






share|improve this answer




























  • cd -la |grep gnupg makes no sense. To view the permissions on a directory with ls, use ls -ld dir. Also, why are you running as root?

    – Kusalananda
    13 hours ago


















-2














the solvings :



IN ANY case before doing this check your /home to verify With other user the needed permission



Check permission of
/home/chh1/



I. e. 
ususally for Debian its Set to
drwxr-xr-x 4 test test 9 Aug 2 09:56 test


to aproach this:



chmod 740 /home/chh1 && chmod +x /home/chh1
chown -R /home/chh1


Check gnupg folder



root@pve:~# cd  -la |grep gnupg
drwx------ 3 root root 6 Jul 12 15:39 .gnupg


this means only root and noone else can do anything



chmod -R 700 ~/gnupg


-R do it recursivly



and then fix the permission



drwx------  2 root root    2 Jul 12 15:39 private-keys-v1.d
-rw-r--r-- 1 root root 3426 Jul 12 15:39 pubring.kbx
-rw-r--r-- 1 root root 1069 Jul 12 15:39 pubring.kbx~
-rw------- 1 root root 1200 Jul 12 15:39 trustdb.gpg


the directory should already having this
the first and second file is 644 and the third is 600



please vote in case i could help






share|improve this answer




























  • cd -la |grep gnupg makes no sense. To view the permissions on a directory with ls, use ls -ld dir. Also, why are you running as root?

    – Kusalananda
    13 hours ago
















-2












-2








-2







the solvings :



IN ANY case before doing this check your /home to verify With other user the needed permission



Check permission of
/home/chh1/



I. e. 
ususally for Debian its Set to
drwxr-xr-x 4 test test 9 Aug 2 09:56 test


to aproach this:



chmod 740 /home/chh1 && chmod +x /home/chh1
chown -R /home/chh1


Check gnupg folder



root@pve:~# cd  -la |grep gnupg
drwx------ 3 root root 6 Jul 12 15:39 .gnupg


this means only root and noone else can do anything



chmod -R 700 ~/gnupg


-R do it recursivly



and then fix the permission



drwx------  2 root root    2 Jul 12 15:39 private-keys-v1.d
-rw-r--r-- 1 root root 3426 Jul 12 15:39 pubring.kbx
-rw-r--r-- 1 root root 1069 Jul 12 15:39 pubring.kbx~
-rw------- 1 root root 1200 Jul 12 15:39 trustdb.gpg


the directory should already having this
the first and second file is 644 and the third is 600



please vote in case i could help






share|improve this answer















the solvings :



IN ANY case before doing this check your /home to verify With other user the needed permission



Check permission of
/home/chh1/



I. e. 
ususally for Debian its Set to
drwxr-xr-x 4 test test 9 Aug 2 09:56 test


to aproach this:



chmod 740 /home/chh1 && chmod +x /home/chh1
chown -R /home/chh1


Check gnupg folder



root@pve:~# cd  -la |grep gnupg
drwx------ 3 root root 6 Jul 12 15:39 .gnupg


this means only root and noone else can do anything



chmod -R 700 ~/gnupg


-R do it recursivly



and then fix the permission



drwx------  2 root root    2 Jul 12 15:39 private-keys-v1.d
-rw-r--r-- 1 root root 3426 Jul 12 15:39 pubring.kbx
-rw-r--r-- 1 root root 1069 Jul 12 15:39 pubring.kbx~
-rw------- 1 root root 1200 Jul 12 15:39 trustdb.gpg


the directory should already having this
the first and second file is 644 and the third is 600



please vote in case i could help







share|improve this answer














share|improve this answer



share|improve this answer








edited 14 hours ago

























answered 14 hours ago









djdomidjdomi

75 bronze badges




75 bronze badges
















  • cd -la |grep gnupg makes no sense. To view the permissions on a directory with ls, use ls -ld dir. Also, why are you running as root?

    – Kusalananda
    13 hours ago





















  • cd -la |grep gnupg makes no sense. To view the permissions on a directory with ls, use ls -ld dir. Also, why are you running as root?

    – Kusalananda
    13 hours ago



















cd -la |grep gnupg makes no sense. To view the permissions on a directory with ls, use ls -ld dir. Also, why are you running as root?

– Kusalananda
13 hours ago







cd -la |grep gnupg makes no sense. To view the permissions on a directory with ls, use ls -ld dir. Also, why are you running as root?

– Kusalananda
13 hours ago












Christian Hick is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Christian Hick is a new contributor. Be nice, and check out our Code of Conduct.













Christian Hick is a new contributor. Be nice, and check out our Code of Conduct.












Christian Hick is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f535276%2fgnupg-problem-gpg-warning-unsafe-ownership-on-homedir-unable-to-change-p%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Hudson River Historic District Contents Geography History The district today Aesthetics Cultural...

The number designs the writing. Feandra Aversely Definition: The act of ingrafting a sprig or shoot of one...

Ayherre Geografie Demografie Externe links Navigatiemenu43° 23′ NB, 1° 15′ WL43° 23′ NB, 1°...