On Mon, Sep 3, 2018 at 12:20 PM Eloy Anguiano <
eloy.a...@gmail.com> wrote:
>
> As soon as the error occurred (and you know, without reading the manual, hahaha), I added myself to the dialout group and yet I still can't access /dev/ttyUSB0 which is where my Mares Puck Pro is mounted. In case there were any group update problem (which I shouldn't have, but just to be sure) I ran a new bash from the bash where I ran subsurface.
You'd need to log in anew to get the group update, since it's the
login process that gives users permissions.
> It is not a protocol problem because by running as root I can access and download the dives. I don't know what other problem there might be.
That really indicates that it is just a permission issue, since it
works as root. So subsurface works fine in theory.
You could try to do the whole "strace -f" thing and then look for
ttyUSB0 in the resulting filesystem trace.
> Just to check it out:
>
> eloy@amaltea:~$ cat /etc/group | grep dialout
> dialout:x:20:eloy
> eloy@amaltea:~$ ls /dev/ttyUSB0 -la
> crw-rw------ 1 root dialout 188, 0 Sep 3 21:10 /dev/ttyUSB0
The real check would be to run 'id':
[torvalds@i7 ~]$ id
uid=1000(torvalds) gid=1000(torvalds)
groups=1000(torvalds),10(wheel),18(dialout)
context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
and checking that the dialout group is listed for your current shell session.
There *might* be some odd Ubuntu apparmor rule etc that keeps even
dialout from actually opening things. Ubuntu has had those kinds of
oddities before. See for example
https://bugs.launchpad.net/ubuntu/+source/cups/+bug/677432
and if it's apparmor you should see some kind of audit log about it in
your system logs,
audit: ...: apparmor="DENIED" operation="open" .. name="/dev/ttyUSB0" ..
but I don't run Ubuntu and don't know what their security settings are.
So if it's not the dialout thing, you need to check the ubuntu forums
for apparmor.
Linus
Linus