View Full Version : /dev/gps0 permission denied

12th March 2007, 11:26 PM
I am trying to set up my GPS to sync ntpd.

I know my GPS works as I can see the 4800 baud data on the serial port using gtkterm.

I set my ntp.conf:

server mode 1 version 4 prefer
fudge refid PPS flag2 1 flag3 time1 0.000 stratum 1

Okay I then made a symlink for /dev/gps0 to /dev/ttyS0

Its got full permissions

When I restart ntpd I get this error in the logs:

/dev/gps0 permission denied

It then freezes ntpd. I have to remove the symlink of /dev/gps0 and restart ntpd, I then get a plain it can't find /dev/gps0 and ntpd starts up.

I read somewhere someone said it is selinux. If it is what option do I need to modify in selinux to get ntpd and gps working?


18th March 2007, 11:35 AM

I decided to use gpsd, but I found ntpd was still not using the gps.

Turns out to be selinux, you got to edit the policies and disable selinux on ntpd and then it will allow gpsd to set the time. I also suspect you could also run ntpd directly from the /dev/ttyS0, but it works PPS using gpsd.