Re: Change permissions on /dev file?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Toralf Lund wrote:


How can I update permissions on a device file on an FC4 setup? I mean, I know I can use chmod, of course, but the problem is that for /dev special files, the changes are lost on reboot. [ ... ]




grep -n "sg" /etc/udev/permissions.d/50-udev.permissions
The permissions are set there.
Right. I haven't quite got used to this new(ish) udev stuff... Seems to me now it must be the place for the setting I want, but the location you mention can't be correct for my system, as /etc/udev has no permissions.d.

Look to /etc/udev/rules.d
HTH


I think I should be able to define an appropriate rule for my unit, but I'm surprised to find that the udev doc does not mention a key containing the device type or vendor/product id (as reported e.g. in /proc/scsi/scsi.) Is there really now way to do direct match on those?


Actually, it may look like SYSFS{type} will give me what I want (for device type.) I now have added

KERNEL=="sg0", BUS=="scsi", SYSFS{type}=="6", SYMLINK="scanner", MODE="0666"

which quite definitely has an effect, but not the one I want. In fact after I did this, the device is still owned by root and accessible by nobody else (i.e. has mode 0600.) Then if a user logs in via a local GNOME session, owner is changed to that user, and the mode stays the same. This is the same kind of behaviour as for CD-ROM, but is not right in this case, as I want to share the scanner across the net (via saned or just startup of the scanner software via ssh.) In fact, I'm not happy with the general trend of assuming the desktop user "owns" everything, as to me, flexibility in sharing resources is a very large part of what Linux is or should be about.

Anyhow, how do I get udev to actually use the mode I've told it to use???

- Toralf


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux