¿ªÔÆÌåÓý

Permission Denied with mkiss to Direwolf on Debian Hamradio Pure blend install


 

I have direwolf and ax25 setup on a Raspberry Pi with Raspbian and it's all working good. I just tried to install and setup Debian Hamradio Pure Blend on a desktop that comes with ax25 and Direwolf preinstalled, and I'm having trouble getting the kissattach and mkiss to Direwolf to work

I start direwolf with the -p option, and then do:

kev@kh-debian:~$ sudo kissattach /dev/ptmx 1 44.56.4.118
AX.25 port 1 bound to device ax0
Awaiting client connects on
/dev/pts/4


Then I do:

kev@kh-debian:~$ sudo mkiss /tmp/kisstnc /dev/pts/4
mkiss: open: Permission denied


And I get this Permission denied, and I'm stuck.


I've tried the other workaround with socat, so I've tried starting without the -p, and then doing

socat PTY,raw,echo=0,link=/tmp/kisstnc TCP4:127.0.0.1:8001


and it sits there, but at that point I'm not sure what I need to mkiss to. Do I need to know what the /dev/pts number is, and presumably socat has created a pts that I need to pass to mkiss?


I've tried these same steps on Mint 17.3 and got exactly the same error too, so not sure how to work around this at this point?


Thanks, Kevin KK6DCT



David Ranch
 

Strange. Try installing 'strace' and send us the trailing part from the output of:

sudo strace mkiss /tmp/kisstnc /dev/pts/4

--David


On December 23, 2016 12:00:01 PM CST, "kevin_hooke@... [direwolf_packet]" wrote:
?

I have direwolf and ax25 setup on a Raspberry Pi with Raspbian and it's all working good. I just tried to install and setup Debian Hamradio Pure Blend on a desktop that comes with ax25 and Direwolf preinstalled, and I'm having trouble getting the kissattach and mkiss to Direwolf to work

I start direwolf with the -p option, and then do:

kev@kh-debian:~$ sudo kissattach /dev/ptmx 1 44.56.4.118
AX.25 port 1 bound to device ax0
Awaiting client connects on
/dev/pts/4


Then I do:

kev@kh-debian:~$ sudo mkiss /tmp/kisstnc /dev/pts/4
mkiss: open: Permission denied


And I get this Permission denied, and I'm stuck.


I've tried the other workaround with socat, so I've tried starting without the -p, and then doing

socat PTY,raw,echo=0,link=/tmp/kisstnc TCP4:127.0.0.1:8001


and it sits there, but at that point I'm not sure what I need to mkiss to. Do I need to know what the /dev/pts number is, and presumably socat has created a pts that I need to pass to mkiss?


I've tried these same steps on Mint 17.3 and got exactly the same error too, so not sure how to work around this at this point?


Thanks, Kevin KK6DCT



 

Thanks David, here's the output from strace:

kev@kh-debian:~$ sudo mkiss /tmp/kisstnc /dev/pts/3
mkiss: open: Permission denied
kev@kh-debian:~$ sudo strace mkiss /tmp/kisstnc /dev/pts/3
execve("/usr/local/sbin/mkiss", ["mkiss", "/tmp/kisstnc", "/dev/pts/3"], [/* 14 vars */]) = 0
brk(0)????????????????????????????????? = 0x11be000
access("/etc/ld.so.nohwcap", F_OK)????? = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f594967b000
access("/etc/ld.so.preload", R_OK)????? = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=109904, ...}) = 0
mmap(NULL, 109904, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f5949660000
close(3)??????????????????????????????? = 0
access("/etc/ld.so.nohwcap", F_OK)????? = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/tls/x86_64/libax25.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/tls/x86_64", 0x7fff60a9e070) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/tls/libax25.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/tls", 0x7fff60a9e070) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/x86_64/libax25.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/x86_64", 0x7fff60a9e070) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libax25.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
open("/usr/lib/x86_64-linux-gnu/tls/x86_64/libax25.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/tls/x86_64", 0x7fff60a9e070) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/tls/libax25.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/tls", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/x86_64-linux-gnu/x86_64/libax25.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/x86_64", 0x7fff60a9e070) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libax25.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=69632, ...}) = 0
open("/lib/tls/x86_64/libax25.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/tls/x86_64", 0x7fff60a9e070) = -1 ENOENT (No such file or directory)
open("/lib/tls/libax25.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/tls", 0x7fff60a9e070)??????? = -1 ENOENT (No such file or directory)
open("/lib/x86_64/libax25.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64", 0x7fff60a9e070)???? = -1 ENOENT (No such file or directory)
open("/lib/libax25.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260$\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=144600, ...}) = 0
mmap(NULL, 2136192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5949253000
mprotect(0x7f594925c000, 2097152, PROT_NONE) = 0
mmap(0x7f594945c000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9000) = 0x7f594945c000
close(3)??????????????????????????????? = 0
access("/etc/ld.so.nohwcap", F_OK)????? = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\34\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1738176, ...}) = 0
mmap(NULL, 3844640, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5948ea8000
mprotect(0x7f594904a000, 2093056, PROT_NONE) = 0
mmap(0x7f5949249000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a1000) = 0x7f5949249000
mmap(0x7f594924f000, 14880, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f594924f000
close(3)??????????????????????????????? = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f594965f000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f594965e000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f594965d000
arch_prctl(ARCH_SET_FS, 0x7f594965e700) = 0
mprotect(0x7f5949249000, 16384, PROT_READ) = 0
mprotect(0x7f594967d000, 4096, PROT_READ) = 0
munmap(0x7f5949660000, 109904)????????? = 0
brk(0)????????????????????????????????? = 0x11be000
brk(0x11df000)????????????????????????? = 0x11df000
open("/var/lock/LCK..kisstnc", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/var/lock/LCK..3", O_RDONLY)????? = -1 ENOENT (No such file or directory)
open("/tmp/kisstnc", O_RDWR|O_NONBLOCK) = -1 EACCES (Permission denied)
dup(2)????????????????????????????????? = 3
fcntl(3, F_GETFL)?????????????????????? = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f594967a000
lseek(3, 0, SEEK_CUR)?????????????????? = -1 ESPIPE (Illegal seek)
write(3, "mkiss: open: Permission denied\n", 31mkiss: open: Permission denied
) = 31
close(3)??????????????????????????????? = 0
munmap(0x7f594967a000, 4096)??????????? = 0
exit_group(1)?????????????????????????? = ?
+++ exited with 1 +++


 

As an experiment I started direwolf with sudo, and mkiss connects ok, and I can use axcall to make a call to a nearby node successfully.

Is there something I need to do to open permissions on /tmp/kisstnc so I can run direwolf without sudo?

Thanks, Kevin KK6DCT