gpsd cannot open /dev/ttyUSB0

Bug #584936 reported by Thomas Zehetbauer
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gpsd (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: gpsd

from the man page:

> gpsd must start up as root in order to open the NTPD shared-memory segment, open its logfile, and create its local control
> socket. Before doing any processing of GPS data, it tries to drop root privileges by setting its UID to "nobody" (or another userid
> as set by configure) and its group ID to the group of the initial GPS passed on the command line — or, if that device doesn't
> exist, to the group of /dev/ttyS0.

> The assumption behind gpsd's particular behavior is that all the tty devices to which a GPS might be connected are owned by
> the same non-root group and allow group read/write, though the group may vary because of distribution-specific or local
> administrative practice. If this assumption is false, gpsd may not be able to open GPS devices in order to read them (such
> failures will be logged)."

since I have no /dev/ttyS0 and gpsd is configured for start up without any devices / adding devices later via hotplug / control socket it switches it's user-/group-id to nobody(65535) / root(0) and can therefore not open /dev/ttyUSB0 which is later created with group id dialout by udev.

Tags: patch
description: updated
Revision history for this message
Oleg Malashenko (oma-jc404) wrote :

Confirmed in 12.04.2

Fixed in GPSD in Aug 2009, here is the original bug report in Debian bugtracker http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542384

Gpsd developers added compile time option (!?) to set fallback gpsd group when device from command line is unavailable when gpsd starts. IMO, it should be runtime command line argument, not compile time option, but that is what we've got.

Attached patch setting 'gpsd_group=dialout' compile option.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gpsd (Ubuntu):
status: New → Confirmed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "gpsd_default_group.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Bernd Zeimetz (bzed) wrote :

Fixed in 3.10-1

Changed in gpsd (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.