PDA

View Full Version : /dev/gps0 permission denied



105547111
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 127.127.20.0 mode 1 version 4 prefer
fudge 127.127.20.0 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?

Thanks!

105547111
18th March 2007, 11:35 AM
Fixed...

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.