tartavull / pyalienfx

Automatically exported from code.google.com/p/pyalienfx
GNU General Public License v3.0
0 stars 0 forks source link

usb.core.USBError: Access denied (insufficient permissions) #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

I follow the standard procedure and when I launch python pyAlienFX.py this is 
what I get:

What is the expected output? What do you see instead?

Initializing Driver  ...
Comnputer M17XR3 found ! Loading the parameters ...
libusb couldn't open USB device /dev/bus/usb/002/005: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/002/005: Permission denied.
libusb requires write access to USB device nodes.
Traceback (most recent call last):
  File "pyAlienFX.py", line 765, in <module>
    gui = pyAlienFX_GUI()
  File "pyAlienFX.py", line 44, in __init__
    self.driver = AlienFX_Driver()
  File "/home/leobago/Downloads/pyalienfx/AlienFX/AlienFXEngine.py", line 57, in __init__
    self.Take_over()
  File "/home/leobago/Downloads/pyalienfx/AlienFX/AlienFXEngine.py", line 109, in Take_over
    self.dev.detach_kernel_driver(0)
  File "/home/leobago/Downloads/pyalienfx/usb/core.py", line 694, in detach_kernel_driver
    self._ctx.managed_open()
  File "/home/leobago/Downloads/pyalienfx/usb/core.py", line 70, in managed_open
    self.handle = self.backend.open_device(self.dev)
  File "/home/leobago/Downloads/pyalienfx/usb/_debug.py", line 52, in do_trace
    return f(*args, **named_args)
  File "/home/leobago/Downloads/pyalienfx/usb/backend/libusb10.py", line 446, in open_device
    _check(_lib.libusb_open(dev.devid, byref(handle)))
  File "/home/leobago/Downloads/pyalienfx/usb/backend/libusb10.py", line 357, in _check
    raise USBError(_str_error[retval.value])
usb.core.USBError: Access denied (insufficient permissions)

What version of the product are you using? On what operating system?

M17 and ubuntu 11.10

Please provide any additional information below (Python Error Message if
possible).

Original issue reported on code.google.com by leob...@gmail.com on 22 Jan 2012 at 3:45

GoogleCodeExporter commented 9 years ago
Ok, I will have to take a look ! 

can you post the output of : lsusb

Original comment by ledjfou125 on 22 Jan 2012 at 4:49

GoogleCodeExporter commented 9 years ago
Hello, I tried the another software and I got pretty much the same error. Then 
I thought is probably not a software bug but a problem in my configuration. I 
googled a bit and I found this solution that worked for me:

First, go to System - Administration - Users and Groups. Click on the "Manage 
Groups" button.
If you don't have one already, create a group called "usbusers". After you 
create it, highlight it and click on Properties. Put a checkmark next to your 
name (and anyone else who needs full permissions to USB devices).

Then open up a terminal (Applications - Accessories - Terminal).
In the terminal, type:
sudo gedit /etc/udev/rules.d/47-usb.rules
This should open up an empty file in a text editor called "gedit".
(note that the name of the file is not important, you can call it whatever you 
want, but since the rules in this folder are executed in order, I think it is 
best to name it starting with a number in the 40-49 range)

In that file, write the following:

# User Edit
SUBSYSTEM=="usb", MODE="0666", GROUP="usbusers"

Save and close the file. This file should allow full access (mode=0666) to 
anyone in the "usbusers" group for USB devices. Also, the "# User Edit" is a 
comment (denoted by the # at the start of the line). I like to leave comments 
in any file I edit just so I know I have been there before in case I come back 
to do more editing.

Reboot and cross your fingers!

Original comment by leob...@gmail.com on 22 Jan 2012 at 2:56

GoogleCodeExporter commented 9 years ago
By the way, your software is awesome! Merci!

Original comment by leob...@gmail.com on 22 Jan 2012 at 3:00

GoogleCodeExporter commented 9 years ago
No problem ! 
Just wondering why did you used a Virtual Machine instead ? 
Because your probleme came from the VM not the soft ;)

Anyway happy to hear it's corrected ;)

Original comment by ledjfou125 on 22 Jan 2012 at 6:19

GoogleCodeExporter commented 9 years ago
Hi there,
Can someone help me. I use Ubuntu 11.10 so there is no such thing as System - 
Administration - Users and groups bottons. So basically I can not access those 
using GUI. So what should I do then. Thanks in advance.

Original comment by lnguy...@nd.edu on 2 Mar 2012 at 3:54

GoogleCodeExporter commented 9 years ago
you can add a group and add you as part of the group with the commands 
addgroup GROUPNAME
adduser USER GROUP

(You better check with a --help as I am not sure 100% it's the right sintax)

Original comment by ledjfou125 on 8 Mar 2012 at 2:41