Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#2077 - udev default permissions for cds

Attached to Project: Arch Linux
Opened by Xavier de Labouret (zezaz) - Wednesday, 26 January 2005, 14:15 GMT
Last edited by Judd Vinet (judd) - Wednesday, 26 January 2005, 19:06 GMT
Task Type Bug Report
Category System
Status Closed
Assigned To Judd Vinet (judd)
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Hi,

Adding a user to the "optical" group does not let him read cds. For example, on my PC, the udev configuration creates for my cd reader the following device:

/dev/hdc, permissions 660, user root, group disk.

/dev/cdroms/cdrom0 is just a symlink, so setting permissions on it does not help. From what i understand, this is what is done by the default configuration.

Creating a /etc/udev/permissions.d/00.rules with the following contents and rebooting does not work:

# optical group can read cds
hdc:root:optical:0664

It is ignored.

Is it possible to change the default udev configuration and initialize default CD/DVD devices permissions to something like this:
root:optical 440,
and cd/dvd writers to:
root:optical 660
and leave HDD devices with the current setup (root:disk) ?

Best thanks, and congrats for this 0.7 release.
This task depends upon

Closed by  Judd Vinet (judd)
Wednesday, 02 February 2005, 01:59 GMT
Reason for closing:  Fixed
Comment by Judd Vinet (judd) - Wednesday, 26 January 2005, 19:06 GMT
Yes, I'd like to have better permission defaults for CDs, but it's a little tricky with udev, because I can't guarantee that hdc is a CD-ROM.

Udev permissions look like this:

hdc:root:optical:0660

Where one has to specify the kernel name of the device, not the symlink. But Arch has no hardware-detection routines where it can pick the CD-ROM device(s) on your system. hdc may very well be a hard drive in one person's system and a DVD-R in another system. This is why CD-ROM permissions have to be added manually by the user.

I'm still looking for a good solution to this, short of hardware auto-detection itself.
Comment by Tobias Powalowski (tpowa) - Thursday, 27 January 2005, 16:35 GMT
there is a script in udev 50 package under extras
perhaps you can have a look at that.
i didn't test it yet but it could work
Comment by Tobias Powalowski (tpowa) - Thursday, 27 January 2005, 16:36 GMT
i forgot:
autodetection for mountpoints can be done by hal.
Comment by Xavier de Labouret (zezaz) - Friday, 28 January 2005, 15:10 GMT
Sorry if i just submitted a bug report without proposing a solution, i have a limited understanding of udev as of today.

However, i digged into the /etc/udev/ide-devfs.sh file, and it loogs like it handles on the fly the instanciation of ide devices. I thought something like this could be used to set permissions on the fly for these devices.

Comment by Tobias Powalowski (tpowa) - Tuesday, 01 February 2005, 07:20 GMT
i tested the cdsymlinks.sh stuff it works for creating the right symlinks in /dev/
permissions cannot be set :( but well now the symlinks are done automatically :)
could you add this to udev?
you have to insert the stuff from cdsymlink.sh in udev.rules and add the script and conf to udev package
Comment by Tobias Powalowski (tpowa) - Tuesday, 01 February 2005, 09:15 GMT
done look at attachements :)
Comment by Tobias Powalowski (tpowa) - Tuesday, 01 February 2005, 11:17 GMT
ok corrected the files again:
the problem is the cdromsymlink.sh will break devfs links in /dev/cdroms/* and they will not appear anymore, if this is not a problem it could be inlcuded and tata, i found how to set permissions.
i added some floppy symlinks which are needed for kde floppy format and additional set the permissions also to a floppy group.
Comment by Judd Vinet (judd) - Wednesday, 02 February 2005, 01:59 GMT
I've added Tpowa's changes. CD/DVD symlinks are created automatically, now.

Loading...