gpg: cannot open /dev/tty: Permission denied

Donald Neal Donald.Neal@telecom.co.nz
Wed, 29 Sep 1999 13:34:57 +1200


Matthias Urlichs at Thu, 16 Sep 1999 00:33:51 +0200 :


>Randy Harmon:
>>
>> In this case, I'm at the command line, and I can't
>> see that it should go to /dev/tty for any reason. Passphrase,
>> key-confirmation or whatever should go to the controlling terminal
(at least
>> that's what I would expect).
>>
>That's how one talks to the controlling terminal -- open /dev/tty and
>read/write from there. You can't use stdin/out/err; they might be
>redirected. Instead of playing games with isatty() and trying to write
to
>stdin (or read from stdout), gpg uses /dev/tty always. That makes
>sense,
>IMHO.
Unless one was trying to have signed mail sent by software without human intervention, in which case a choice of failure to find /dev/tty or gpg: can't query password in batchmode gpg: skipped `Username' : bad passphrase gpg: : sign+encrypt failed: bad passphrase is not exactly what was wanted. Or have I missed something? - Donald Neal