Re: Pinentry: Permission Denied

2018-06-03 Thread gnupg
Jacob Adams wrote:

> I've been getting the occasional "Pinentry: Permission Denied" error
> when generating new keys with GPGME and leaving pinentry to get the
> password instead of passing it directly (passphrase=True with the python
> bindings). Typically a reboot will fix it but it's rather odd.
> 
> I've attached a couple logs. If there's something else I should be
> logging to catch this error, please let me know.
> 
> Any ideas on what might be causing this?
> A reboot usually fixes it but it's quite annoying.
> 
> Thanks,
> Jacob

it might be permissions on /dev/tty (which looks to be /dev/tty1
from the debugging output). did you su/sudo to another user?


___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: Pinentry: Permission Denied

2018-06-12 Thread Jacob Adams
On 06/03/2018 07:22 PM, gn...@raf.org wrote:
> Jacob Adams wrote:
> 
>> I've been getting the occasional "Pinentry: Permission Denied" error
>> when generating new keys with GPGME and leaving pinentry to get the
>> password instead of passing it directly (passphrase=True with the python
>> bindings). Typically a reboot will fix it but it's rather odd.
>>
>> I've attached a couple logs. If there's something else I should be
>> logging to catch this error, please let me know.
>>
>> Any ideas on what might be causing this?
>> A reboot usually fixes it but it's quite annoying.
>>
>> Thanks,
>> Jacob
> 
> it might be permissions on /dev/tty (which looks to be /dev/tty1
> from the debugging output). did you su/sudo to another user?

That seems to be it. I was overriding getty and launching my own service
as a non-root user and tty1 was still owned by root
I've fixed permissions on the tty in ExecPreStart and haven't seen a
pinentry error since.

https://salsa.debian.org/tookmund-guest/pgpcr/blob/master/debian/pgp-clean-room.service

Thanks,
Jacob




signature.asc
Description: OpenPGP digital signature
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: Pinentry: Permission Denied

2018-06-13 Thread Werner Koch
On Tue, 12 Jun 2018 19:03, tookm...@gmail.com said:

> That seems to be it. I was overriding getty and launching my own service
> as a non-root user and tty1 was still owned by root

If you run gpg with -v with the next released pinentry you will see a
line like this (wrapped)

gpg: pinentry launched (17122 gtk2 1.1.1-beta7 \
   /dev/pts/6 xterm localhost:11.0 20620/1000/5 1000/1000)
 !  !  ! 
   device  mode/uid/gid euid/egid
   of deviceof caller

Maybe this helps in the future to track down such problems easier (mode
and euid etc are new).


Shalom-Salam,

   Werner

-- 
#  Please read:  Daniel Ellsberg - The Doomsday Machine  #
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.


pgpN9sgVp3aaP.pgp
Description: PGP signature
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users