I have created a non-root user on the milkv-duo named david
(me) and login, shell, etc. all works fine. However, after building the mailbox_test
example and transferring it to the duo, root can run the file just fine, but attempting to run as david results in the following error:
03:07 milkv-duo:~> ./tmp/mailbox_test
open failed! fd = -1
root has no problem:
[03:08 milkv-duo:~] # /home/david/tmp/mailbox_test
C906B: cmd.param_ptr = 0x4
C906B: cmd.param_ptr = 0x3
The user david
has UID 1001
1. The user belongs to the david
group GID 1060
as the primary group, as well as the wheel
group. Unix file-permissions are not the problem:
03:26 milkv-duo:~> l tmp/mailbox_test
-rwxr-xr-x 1 david david 10064 Jan 1 1970 tmp/mailbox_test
and the file can be opened and read by the user without issue:
03:27 milkv-duo:~> hexdump -Cv -n 64 tmp/mailbox_test
00000000 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 |.ELF............|
00000010 02 00 f3 00 01 00 00 00 70 06 01 00 00 00 00 00 |........p.......|
00000020 40 00 00 00 00 00 00 00 d0 1f 00 00 00 00 00 00 |@...............|
00000030 05 00 00 00 40 00 38 00 07 00 40 00 1e 00 1d 00 |....@.8...@.....|
The user logs in on tty /dev/pts/1
, and the device permissions seem fine, e.g.
03:23 milkv-duo:~> l /dev/pts
total 0
drwxr-xr-x 2 root root 0 Jan 1 1970 .
drwxr-xr-x 6 root root 1480 Jan 1 1970 ..
crw--w---- 1 root tty 136, 0 Jan 7 03:22 0
crw--w---- 1 david tty 136, 1 Jan 7 03:23 1
crw-rw-rw- 1 root root 5, 2 Jan 1 1970 ptmx
I’ve also tried adding the user to adm
, sys
and tty
groups (logging out/in) following each change and sync
, so I’m left scratching my head.
Anybody know why the non-root user cannot execute the mailbox_test
example on the duo?
Footnotes:
1 dhcpcd already had UID 1000
– poor choice as most distros start user UIDs at 1000 – which will cause issues with file mapping if the user on the host was the first user and has UID 1000
and now has something different on the duo.