I'm running CachyOS and use a 3D-printer program that communicates through /dev/ttyACM0. The program only works after I run chmod with sudo to change the device permissions, but I have to repeat that every time I start the computer. The printer normally stays powered on and connected, although the computer is shut down overnight. Shouldn't the permission change persist like it would for a regular file? What's the proper long-term fix?
3 Answers
Check which group owns the device with something like `ls -l /dev/ttyACM0`. Serial devices are commonly assigned to a group such as `dialout`, `uucp`, or `modem`. On CachyOS, `uucp` may be the relevant group. Add your account to the appropriate group, for example `sudo usermod -aG uucp $USER`, then log out and back in—or reboot—for the new membership to take effect. You usually shouldn’t need chmod afterward.
That device path is created by udev in /dev, which is generally a temporary device filesystem. When the machine reboots—or the device is unplugged and detected again—the device node is recreated, so manual chmod changes disappear. The better fix is to use the permissions udev assigns automatically rather than changing the node by hand.
The device file is managed by udev and its permissions are set whenever the printer is detected. Adding your user to the device’s group is usually enough. If the default udev settings don’t work for your printer, create a custom udev rule matching its USB vendor and product IDs, then assign the desired group and mode there.

You could run the chmod command automatically at startup, but a udev rule or the correct user group is more reliable because it also handles the device being recreated after reconnecting the USB cable.