Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Linux System Getting Started Tutorial: permission to permanently modify the USB device in Linux     - Linux System Getting Started Learning: Change the name of the network interface on CentOS7 (Linux)

- Disk partition MBR (Linux)

- MySQL related statements (CRUD) (SQLyog software) (Database)

- Python2 ---- function using dictionaries (Programming)

- MySQL separation Amoeba achieve literacy (Database)

- Git / Github use notes (Linux)

- Linux system security check method (Linux)

- Linux Apache server configure to protect system security (Linux)

- PHP with FastCGI and mod_php Comments (Server)

- How to install PlayOnLinux 4.2.5 under Ubuntu 14.04 / 12.04 (Linux)

- Install Oracle 11g illustrations and dependent libraries under SUSE11 (Database)

- Linux system security configuration Collection (Linux)

- iOS in Singleton (Programming)

- Android Qemu GPS module (Programming)

- Detailed use Zabbix monitoring Nginx (Server)

- A new method for Linux hidden files (Linux)

- Glibc support encryption by modifying the DNS (Programming)

- Linux and SELinux Exploration Program Manager (Linux)

- Nginx1.8 version upgrade method AMH4.2 Free manually compile (Server)

- About Linux iptables firewall interview questions and answers (Linux)

 
         
  Linux System Getting Started Tutorial: permission to permanently modify the USB device in Linux
     
  Add Date : 2017-01-08      
         
       
         
  Question: When I try to run a USB GPS receiver in Linux, I encountered the following errors from gpsd.

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 gpsd not have permission to access the USB device (/ dev / ttyUSB0). How do I permanently change its permissions on Linux?

When you read or write to a USB device in the running process, the user process / group must have permission to do the job. Of course, you can use the chmod command to manually change the permissions for USB devices, but the permissions manually change is only temporary. USB device will be restored to its default permissions on the next restart.

As a permanent way, you can create a rule-based udev permission of USB, it can assign any privilege mode according to your choice. Here is how to do it.

First, you need to find out vendorID and productID USB devices. Use lsusb command.

$ Lsusb -vvv

lsusb output above, find your USB device, and find "idVendor" and "idProduct" field. In this case, our results are idVendor (0x067b) and idProduct (0x2303)

Create a new udev rule below.

$ Sudovi / etc / udev / rules.d / 50-myusb.rules
SUBSYSTEMS == "usb", ATTRS {idVendor} == "067b", ATTRS {idProduct} == "2303", GROUP = "users", MODE = "0666"
Be replaced with your own "idVendor" and "idProduct". MODE = "0666" represents the permissions for USB devices.

Now restart your computer and reload udev rules:

$ Sudo udevadm control --reload
Then verify permissions under USB devices.
     
         
       
         
  More:      
 
- To install OwnCloud 7.0.4 under Ubuntu (Linux)
- Web cache basics: terminology, HTTP headers, and caching policies (Server)
- Detailed software to run UnixBench (Linux)
- C / C ++ various data types Conversion Summary (Programming)
- Vim Getting Started Tutorial (Linux)
- CentOS 7 update source - the use of domestic sources 163 yum (Linux)
- C ++ virtual functions Classic Insights (Programming)
- How to choose the correct HTTP status code (Server)
- Linux commands with browsing and downloading files (Linux)
- JavaScript, some conclusions about the implicit conversion (Programming)
- MySQL high availability cluster fragmentation of deployment uses Cobar (Database)
- Create RAID 1 (mirroring) with two disks (Linux)
- Django url () function Detailed (Programming)
- CentOS install expect (Linux)
- Two alert log ORA Errors (Database)
- Ubuntu arm-none-eabi-gcc compiler treated with STM32F10x (Linux)
- Database start listening TNS-12537, TNS-12560 error (Database)
- PLSQL Developer synchronization table tools (Database)
- Sublime Text Add instructions to insert the current time zone (Linux)
- Oracle through the alarm log view and inspect the main library, physical and snapshot standby database (Database)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.