linobase "Error opening USB device: Permission denied"

27 views
Skip to first unread message

Pito Salas

unread,
Jan 12, 2024, 5:16:15 PMJan 12
to LINOROBOT
Some trouble somewhere with /dev/linobase permissions, or ownership or something. When I get to doing: platformio run --target upload -e teensy41 I get this error:

"Error opening USB device: Permission denied"

But if I do: sudo platformio run --target upload -e teensy41

Then it works. 

I am trying to use the vscode arduino/teensy plugin and it does not give me a way to ask for a sudo so I think I have to fix this.

Any insight?

Pito

Chris Albertson

unread,
Jan 13, 2024, 1:56:20 PMJan 13
to Pito Salas, LINOROBOT
This is a “Linux Thing”.   The magic Google Search Term is “udev rules”

When you plug in a new USB device, Linux asks it “What are you?” then looks up the rule associated with that kind of device and then does whatever the rule says.  Perhaps in this case the udev rule says to create a device in /dev that is readable/writable by root.    If you don’t like this you have to edit the rule.    Google will find dozens of tutorials on how this all works.





--
You received this message because you are subscribed to the Google Groups "LINOROBOT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linorobot+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/linorobot/ec53c52e-9a09-4e30-8359-d4ece3c6d005n%40googlegroups.com.

Pito Salas

unread,
Jan 13, 2024, 4:21:39 PMJan 13
to Chris Albertson, LINOROBOT, Pito Salas
Hi Chris

Thanks. The thing that’s confusing is that the relevant device seems to have the right protection:

lrwxrwxrwx 1 root root 7 Mar  2  2023 /dev/linobase -> ttyACM0

Maybe the fact that I am doing this under user ubuntu is still stopping it from allowing writing?

Pito

jime...@gmail.com

unread,
Jan 13, 2024, 11:20:38 PMJan 13
to LINOROBOT

Hi Pito,

Have you tried this updated udev rules?

Chris Albertson

unread,
Jan 13, 2024, 11:22:15 PMJan 13
to Pito Salas, LINOROBOT, Pito Salas
In general, in the Unix world, the best advice is to NEVER use fake users.  A user is a person, not an abstraction.  SO usernames should be “Jib, Bob or Susan” never “robot operator” or whatever.    Groups are for abstractions. “RobotOperator” should be a group that Jim or Susan could be a member of. 

This is a side issue.  To find what’s up with the immediate problem maybe there i a log file with more detail?

Pito Salas

unread,
Jan 14, 2024, 8:31:33 AMJan 14
to Chris Albertson, LINOROBOT
Thanks Chris. It turned out to be new and improved UDEV rule file from the teensy vendor does the trick. Best,

Pito
Reply all
Reply to author
Forward
0 new messages