Separate Keyring and config for Script

Gregor Zattler telegraph at
Mon May 23 16:49:28 CEST 2005

Hi Sascha,,
* ml at <ml at> [23. Mai. 2005]:
> gpg --no-default-keyring --keyring
> /home/sascha/gpg-skript/auto-gpg-keyring.gpg --options /dev/null
> --no-secmem-warning --charset utf-8 --import /my/path/*.asc 
> it works for about 500 files - followed by:
> gpg: keys 12345: public key "Some Name <bla at>" imported
> gpg: can't create `/home/sascha/gpg-skript/auto-gpg-keyring.gpg.tmp':
> Too many open files
> gpg: DBG: error opening lockfile
> `/home/sascha/gpg-skript/auto-gpg-keyring.gpg.lock': Too many open
> files
> gpg: release_dotlock: lockfile error
> gpg: can't unlock `/home/sascha/gpg-skript/auto-gpg-keyring.gpg'
> Any ideas ?

You hit the limit of concurrently open files.  Give "ulimt -a" a
try, it shows the limits of your shell (see bash (1)).

A way to circumvent this limit is:

find /my/path/*.asc -print0|xargs -0 -r -n 0 gpg \
--no-default-keyring --keyring \
/home/sascha/gpg-skript/auto-gpg-keyring.gpg --options /dev/null \
--no-secmem-warning --charset utf-8 --import 

This invokes one gpg process for each file: one after another.
This may be slow, try --no-auto-check-trustdb as an additional
gpg command line option.

Ciao, Gregor

More information about the Gnupg-users mailing list