I want to read data from a GPS attached to an USB and seen by the system as a serial device. I would like not to use chmod u+s
nor sudo
and give to the process just the minimum capabilities to do that.
To test, I used the cat
command:
sudo cat /dev/ttyACM0
This works, but could I give to cat
a specific capability to read the serial port?
I tried setcap cap_sys_rawio+p
and cap_sys_tty_config+p
without success.
My idea is to give the binary just the minimum rights it need to do its task.