gpsd is running as its own user gpsd, and chrony as _chrony.
$ groups gpsd
gpsd : dialout
$ groups _chrony
_chrony : _chrony
I have tried adding gpsd to group _chrony and changing the ownership and permissions of chrony.ttyS0.sock but to no avail. I always see the permission denied message.
AppArmor rules for gpsd appear to allow the connection, too:
# default paths feeding GPS data into chrony
/{,var/}run/chrony.tty{,S,USB,AMA}[0-9]*.sock rw,
/tmp/chrony.tty{,S,USB,AMA}[0-9]*.sock rw,
GPSd fails to access the socket used to communicate PPS signals with Chrony.
From the startup log:
gpsd:PROG: PPS:/dev/ttyS0 connect chrony socket failed: /var/run/ chrony. ttyS0.sock, error: -2, errno: 13/Permission denied
The socket in question has these permissions:
$ ls -l /var/run/ chrony. ttyS0.sock chrony. ttyS0.sock
srwxr-xr-x 1 root root 0 Apr 10 17:25 /var/run/
gpsd is running as its own user gpsd, and chrony as _chrony.
$ groups gpsd
gpsd : dialout
$ groups _chrony
_chrony : _chrony
I have tried adding gpsd to group _chrony and changing the ownership and permissions of chrony.ttyS0.sock but to no avail. I always see the permission denied message.
AppArmor rules for gpsd appear to allow the connection, too:
# default paths feeding GPS data into chrony }run/chrony. tty{,S, USB,AMA} [0-9]*. sock rw, chrony. tty{,S, USB,AMA} [0-9]*. sock rw,
/{,var/
/tmp/
So I am stumped.