Misleading error message on keymgr import-bind
I tried importing a key pair created with BIND's dnssec-keygen
and kept getting an error message saying Error (not exists)
; first I thought keymgr
couldn't find the file, then I thought maybe it was the zone which didn't exist.
It turns out that it was a simple permission problem (EACCESS
) so a Permission denied
would have been clearer. To me. :-)
I found the problem using strace(1):
openat(AT_FDCWD, "/var/lib/knot/zones/bindkey/Kbb.tm.+008+40171.private", O_RDONLY) = -1 EACCES (Permission denied)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3), ...}) = 0
write(1, "Error (not exists)\n", 19Error (not exists)
) = 19
After changing the ownership of the K*.{private,key}
files the import succeeded
keymgr bb.tm import-bind Kbb.tm.+008+40171.private
6d572c90095de1abbb3c2e465e92719a3fa0cf14
OK
Maybe it would be possible to change the diagnostic. This is knot-2.9.5-1
installed from your copr.