File permissions issue while doing GPG encypt and decrypt
angel at pgp.16bits.net
Thu Apr 16 03:45:38 CEST 2020
On 2020-04-09 at 10:38 +0530, nithin reddy via Gnupg-users wrote:
> Hi All,
> We are using GnuPG 2.0.14 in CentOS linux servers. We are able to try
> to encrypt and decrypt the files as a root user. Now we are facing
> issues with the normal users who are trying to encrypt a file.
> Example:- Root user and User "nithin" are using same KEY ID for
> encryption and decryptiong, USer "nithin" is trying to encrypt a file
> "file1.txt", file1.txt is owned by nithin, when he encrypt the
> file1.txt, the encrypted file "file1.txt.gpg" permission is getting
> changed to root not nithin, and while "nithin" is trying to decrypt a
> file which have nithin as owner and group, the decrypted file
> permissions also getting changed to root
> and root.
> Need your help and suggestions here.
Did you somehow end up with the gpg program being setuid?
(as a 'solution' to gpg keyring files owned by root if he was directly
accesing nithin keyring, perhaps, whereas you should have changed the
owner there to nithin)
More information about the Gnupg-users