Ticket #2076 (closed task: fixed)

Opened 1 year ago

Last modified 2 months ago

Inconsistent permissions for floppy devices

Reported by: alexander@linuxfromscratch.org Assigned to: dj@linuxfromscratch.org
Priority: normal Milestone: 6.4
Component: Book Version: 6.3
Severity: normal Keywords:
Cc:

Description

/dev/fd0 has mode 0660, while /dev/fd0u1440 has mode 0640. Please change the create_floppy_devices udev rule by changing 0640 to 0660.

Change History

09/16/07 04:27:30 changed by alexander@linuxfromscratch.org

Or better, remove "-M 0640".

05/31/08 13:27:55 changed by Bryan Kadzban

Looking through more old tickets; I forgot this one existed. Upstream's rules still use "-M 0640" on the script, and don't specify a mode for fd[0-9]*, so there's still a mismatch. (Even though we've removed this stuff from the LFS custom rules files, and are using all upstream rules for floppy devices.)

I think the best fix is to get upstream to either add MODE="0640" to the fd[0-9]* rule, or remove "-M 0640" from the create_floppy_devices script call, as you said. (It depends on whether you want the floppy group to have raw write access to the device. I believe there have been cases where upstream didn't want e.g. the disk group to have write access to hard-drive and partition devices.) Do you want to bug them about it, or should I? (There are days where I think some of the maintainers have kill-filed me, so if I do it, nothing may happen. :-) But whatever; I can try.)

05/31/08 23:22:32 changed by alexander@linuxfromscratch.org

The discrepancy between "disk" and "floppy" groups are because of their different purposes: "disk" is almost strictly for backup software, "floppy" is for people. Compare with CD-ROMs. So I insist in 0660 permissions for floppies.

10/05/08 14:37:01 changed by bdubbs@linuxfromscratch.org

  • milestone changed from 7.0 to 6.4.

10/08/08 22:30:16 changed by bdubbs@linuxfromscratch.org

Looking at udev-130, the rules are:

KERNEL=="fd[0-9]",    GROUP="floppy"
KERNEL=="fd[0-9]", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G floppy $root/%k"

I am reluctant to change the standard rules because they could be overwritten with a later update. It looks like we will need to add

KERNEL=="fd[0-9]", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0660 -G floppy $root/%k"

This should work because create_floppy_devices does an unlink of the node before recreating the new one.

10/14/08 20:49:25 changed by dj@linuxfromscratch.org

  • owner changed from lfs-book@linuxfromscratch.org to dj@linuxfromscratch.org.
  • status changed from new to assigned.

10/14/08 21:02:48 changed by dj@linuxfromscratch.org

  • status changed from assigned to closed.
  • resolution set to fixed.

Fixed in r8663.