0
votes

First, I do not understand why I am having to ask this question. I am running as root, and root is part of the "plugdev" group.

I am trying to add a MagTek USB-Magstripe reader to my Linux system and it is not working. When I try and output >> to a file I get "permission denied". When I "cd /dev/usb" and "ls -la" I see:

crw------- 1 root root 180, 0 Jul 5 10:52 hiddev0

And I can chmod it to 666 or 777 but when I plug it back in it reverts back to its old permissions. So looking around the web I came up with the following from udevadm and created 99-rules.local in /etc/udev/rules.d :

SUBSYSTEM="usbmisc", ATTRS{idProduct}=="0002", ATTRS{serial}=="0000:04:00.0", ACTION=="add", RUN+="/bin/chmod 777 /dev/$name"

"service udev restart" does not work, logging out does not work, rebooting my system does not work. Whatever I do this device defaults back to its old permissions.

Ideally, I would like ALL USB devices to be 755 by default. I don't understand why this is so difficult to achieve and why I can't do this by default anyway as root?

1

1 Answers

0
votes

run lsusb and dmesg to get more information of the magstripe reader (see this https://unix.stackexchange.com/questions/68588/fixed-udev-rules-for-usb-modems). Get the USB Vendor ID and Product ID and try to create the udev rule like in this Udev rules are not working for libusb on Ubuntu 12.04

SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="da77", GROUP="plugdev

place the file in /etc/udev/udev.d

https://dentrassi.de/2014/11/03/identify-gsm-modem-devices-using-udev/