I need to run the /sys/bus/usb/drivers/bind
and its companion /sys/bus/usb/drivers/unbind
from a Python script WITHOUT touching the sudoers
file.
The main issues is that I can't use sudo
from the Python script, so I need to make bind/unbind runnable by the normal user (I can't run the Python script as root either).
Update: I created a group, added the normal user and root to that group and did
chmod root:mygroup
The commands I want to access without having to use sudo or provide a password are:
/sys/bus/usb/drivers/usb/bind /sys/bus/usb/drivers/usb/unbind
They have the following permissions:
-rwxrwxrwx 1 root mygroup # (for bind)
-rwxrwxrwx 1 root mygroup # (for unbind)
Also, the folders leading up to the two programs/commands (namely /sys/bus/usb/drivers/usb/) have this:
drwxr-xr-x 2 root root
I still get "permission denied" but if I **keep all configurations plus a chmod 777**
on the bind and unbind files it works, where is my error?