Comment 0 for bug 1872175

Revision history for this message
Mark Shuttleworth (sabdfl) wrote :

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
srwxr-xr-x 1 root root 0 Apr 10 17:25 /var/run/chrony.ttyS0.sock

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,

So I am stumped.