You are not logged in.
Pages: 1
Hi all,
I've got a Garmin GPS receiver that I wish to use with Viking. When I plug in the gps a /dev/ttyUSB0 device is created with owner root:root, so in order to be able to use it as a normal user, I need to chmod 666 /dev/ttyUSB0.
I have been looking in /etc/udev/rules.d but I cannot find any rule to modify so that the device is created for root:tty. Guess I reached the end of my skills here.
Could someone please give me a rule that creates /dev/ttyUSB devices that are accessible by a normal user account?
TIA!
Offline
Look into /lib/udev/rules.d/50-udev-default.rules, there's a line
KERNEL=="ttyUSB[0-9]*", NAME="tts/USB%n", SYMLINK+="%k"
I think it should be enough to append
,GROUP="tty"
to it. The proper way would be not to modify that file, but create a new one in /etc/udev/rules.d/ with that line in there. According to udev manual, files in /etc/udev/rules.d/ take precedence over /lib/udev/rules.d.
EDIT: By the way, you might want to file a feature request about this on the bugtracker, it's a pretty reasonable thing to ask.
Last edited by bender02 (2008-11-04 23:50:40)
Offline
Create a new rule which adds a symlink for easy reference, and overrides the permissions. E.g. in /etc/udev/rules.d/91-local.rules
SUBSYSTEM=="usb", ATTR{product}=="CanoScan", GROUP="users", MODE="0660"
KERNEL=="kqemu", NAME="%k", MODE="0660", GROUP="users"
ATTRS{model}=="DVD-RAM GSA-H30N", SYMLINK+="cdrom cdrw dvd dvdrw", MODE="0664"
KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="vboxusers", MODE="0660"
And no, that filename is not chosen randomly. 91 is deliberately higher than the other rules, for the GROUP & MODE to take precedence.
Offline
thanks people, I will try as soon as possible. Yes, I will report a bug since it is indeed unexpected behaviour if you ask me
Offline
It's not really a bug. Udev can't know the desired permissions for every device in existence, so it has to play safe and set the permissions restrictively. It's up to you to set the permissions to whatever is convenient for you, via a custom udev rule.
I would suggest: MODE="0660", GROUP="users"
Offline
Pages: 1