Why do my USB serial permissions reset after every reboot?

0
1
Asked By MellowCedar42 On

I'm using CachyOS with a 3D printer connected as /dev/ttyACM0. The printer is normally powered on and plugged in, but I shut the computer down every morning and boot it again after work. The printer program cannot communicate with the device unless I run chmod with sudo each time. I expected the permission change to persist like permissions on a regular file. Why does it reset, and what is the proper long-term fix?

3 Answers

Answered By SilverPine31 On

Check the group and permissions with something like `ls -l /dev/ttyACM0`. USB serial devices are commonly assigned to a group such as `dialout`, `uucp`, or `modem`, depending on the distribution. On CachyOS, `uucp` may be the relevant group. If that is the group shown by the device, add your user with `sudo usermod -aG uucp $USER`, then log out and back in, or reboot, for the change to take effect. You should not need to run chmod manually afterward.

Answered By QuartzWander7 On

The /dev directory is generally backed by devtmpfs and exists in memory, so device nodes such as /dev/ttyACM0 are recreated during boot or whenever the USB device is connected. Any chmod change made directly to that device node disappears when it is recreated. The normal fix is to use the permissions provided by udev, either by joining the appropriate device group or by creating a udev rule if custom permissions are needed.

NimbleHarbor8 -

A startup script could run chmod again after boot, but that’s more of a workaround. A group membership or udev rule is better because it applies automatically whenever the printer appears.

Answered By BrightLynx56 On

The device file is created and permissioned by udev when the printer is detected, so its name and permissions can be regenerated at boot or after reconnecting the cable. Adding your account to the group assigned to `/dev/ttyACM0` is usually enough; only create a custom udev rule if you need permissions or naming different from the system defaults.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.