Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2810

WSL: how do I set the group for a tty device

$
0
0

I am running usbipd on windows 11 to enable USB devices to attach to WSL. This works. I can run my serial application as root and it works fine. I would rather not run my application as root. My user is in group dialout (and tty).

I cannot get the group of a FTDI serial port to change from root:

:~$ ls /dev/ttyUS* -Alcrw------- 1 root root 188, 0 May 13 08:07 /dev/ttyUSB0

Notice that the group is root and the permissions are 188.lsusb:

$ lsusbBus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hubBus 001 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) ICBus 001 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) ICBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I set up a udev rule in /etc/udev/rules.d/99-usb-serial.rules:

ACTION=="add", SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", GROUP:="dialout", MODE:="0666"

I have a feeling that my udev rules are incorrect, but I looked around and cannot figure out what might be wrong.My method to test changes:

  1. make change to udev rules
  2. close ubuntu terminal, in windows type wsl --shutdown
  3. Open Ubuntu terminal
  4. in windows, type usbipd wsl attach --busid 10-3
    • (device attaches, windows makes a noise as it does)
  5. ls /dev and check the user & permissions
~$ sudo journalctl -b 0 /dev/ttyUSB1No journal files were found.-- No entries --

Viewing all articles
Browse latest Browse all 2810

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>