$ | >

Assign groun `tty` to all /dev/ttyS* with read/write perssions

At the moment, a user is required to run an elevated command to access any of the new /dev/ttySx serial devices, or they are required to assign a group (or user) access to the serial device.
Any assigned permissions on /dev/ttySx will be reset to root:root with owner rw only when the bash.exe is closed and re-opened. Which can be come frustrating with automated scripts

I propose that WSL will assign the group `tty` (or `dialout`) to the serial devices. So that a user may add themselves to the group once and consistently have access to the serial devices without needing to setup permissions again, later on

5 votes
Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)

We’ll send you updates on this idea

Roman Vaughan shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
Submitting...
  • Itai S commented  ·   ·  Flag as inappropriate

    Just confirmed with my linux machine, WSL indeed does not behave correctly.

    This is how /dev/ttyS4 looks "after boot":
    crw-r----- 1 root root 4, 68 Mar 18 02:06 /dev/ttyS4

    To make /dev/ttyS4 work without sudo, I need to run the following commands:
    $ sudo chgrp dialout /dev/ttyS4
    $ sudo chmod g+w /dev/ttyS4

    Then it looks like this:
    crw-rw---- 1 root dialout 4, 68 Mar 18 02:06 /dev/ttyS4

    Which is how it's supposed to look, and of course is working without elevation.

Feedback and Knowledge Base