gpsd[377]: gpsd:ERROR: read-only device open failed: Permission denied
gpsd[377]: gpsd:ERROR: /dev/ttyUSB0: device activation failed.
gpsd[377]: gpsd:ERROR: device open failed: Permission denied - retrying read-only
Looks like gpsd does not have permission to access the USB device (/dev/ttyUSB0). How can I change its default permission mode permanently on Linux?
When you run a process that wants to read or write to a USB device, the user/group of the process must have appropriate permission to do so. Of course you can change the permission of your USB device manually with chmod command, but such manual permission change will be temporary. The USB device will revert to its default permission mode when you reboot your Linux machine.
As a permanent solution, you can create a udev-based USB permission rule which assigns any custom permission mode of your choice. Here is how to do it.
First, you need to identify the vendorID and productID of your USB device. For that, use lsusb command.
From the lsusb output, find your USB device's entry, and look for "idVendor" and "idProduct" fields. In this example, we have idVendor (0x067b) and idProduct (0x2303).
Next, create a new udev rule as follows.
SUBSYSTEMS=="usb", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", GROUP="users", MODE="0666"
Replace "idVendor" and "idProduct" values with your own. MODE="0666" indicates the preferred permission of the USB device.
Now reboot your machine or reload udev rules:
Then verify the permission of the USB device.
Subscribe to Ask Xmodulo
Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.
Support Xmodulo
Did you find this tutorial helpful? Then please be generous and support Xmodulo!




Subscribe to Ask Xmodulo
Support Xmodulo
You could also make the user that launches gpsd be a member of the dialout group.
There's no need to reboot.
"udevadm control --reload", then replug the USB.