I've got a GPS module hanging on the TTL UART wires of my Pi 3B. I don't access the module directly, but via gpsd. Now I've got the following issue: At every reboot, Raspbian (Buster) seems to reset the group and the privilege mask of the UART:
pi@autoradio:/import/valen/autoradio $ ls -al /dev/ttyS0 crw--w---- 1 root tty 4, 64 Sep 11 00:06 /dev/ttyS0 Consequence: gpsd can't access the module and quits:
pi@autoradio:/import/valen/autoradio $ sudo systemctl status gpsd ● gpsd.service - GPS (Global Positioning System) Daemon Loaded: loaded (/lib/systemd/system/gpsd.service; disabled; vendor preset: enabled) Active: active (running) since Sat 2021-09-11 00:05:55 CEST; 17min ago Main PID: 608 (gpsd) Tasks: 1 (limit: 2059) CGroup: /system.slice/gpsd.service └─608 /usr/sbin/gpsd /dev/ttyS0 Sep 11 00:05:55 autoradio systemd[1]: Starting GPS (Global Positioning System) Daemon... Sep 11 00:05:55 autoradio systemd[1]: Started GPS (Global Positioning System) Daemon. Sep 11 00:13:18 autoradio gpsd[608]: gpsd:ERROR: SER: device open of /dev/ttyS0 failed: Permission denied - retrying read-only Sep 11 00:13:18 autoradio gpsd[608]: gpsd:ERROR: SER: read-only device open of /dev/ttyS0 failed: Permission denied Sep 11 00:13:18 autoradio gpsd[608]: gpsd:ERROR: /dev/ttyS0: device activation failed. Sep 11 00:13:18 autoradio gpsd[608]: gpsd:ERROR: /dev/ttyS0: activation failed, freeing device As far as I can remember, I had a privilege structure like this before making a new SD card with a fresh Raspbian:
crw-rw---- 1 root dialout Setting privileges by hand only works until the next shutdown. What's going on here? How can I tell Raspbian to get the hand off the privileges of /dev/ttyS0? Thank you.