Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #161823 > unrolled thread

Incorrect group on /dev/fd0? "disk" vs "floppy"

Started byAnders Andersson <pipatron@gmail.com>
First post2015-12-16 22:20 +0100
Last post2015-12-17 22:10 +0100
Articles 10 — 6 participants

Back to article view | Back to linux.debian.user


Contents

  Incorrect group on /dev/fd0? "disk" vs "floppy" Anders Andersson <pipatron@gmail.com> - 2015-12-16 22:20 +0100
    Re: Incorrect group on /dev/fd0? "disk" vs "floppy" Ulf Volmer <u.volmer@u-v.de> - 2015-12-16 23:10 +0100
    Re: Incorrect group on /dev/fd0? "disk" vs "floppy" Sven Arvidsson <sa@whiz.se> - 2015-12-16 23:20 +0100
      Re: Incorrect group on /dev/fd0? "disk" vs "floppy" Anders Andersson <pipatron@gmail.com> - 2015-12-17 01:10 +0100
        Re: Incorrect group on /dev/fd0? "disk" vs "floppy" Brian <ad44@cityscape.co.uk> - 2015-12-17 20:00 +0100
          Re: Incorrect group on /dev/fd0? "disk" vs "floppy" Sven Arvidsson <sa@whiz.se> - 2015-12-17 22:00 +0100
            Re: Incorrect group on /dev/fd0? "disk" vs "floppy" "Thomas Schmitt" <scdbackup@gmx.net> - 2015-12-17 22:40 +0100
            Re: Incorrect group on /dev/fd0? "disk" vs "floppy" Random832 <random832@fastmail.com> - 2015-12-17 23:00 +0100
            Re: Incorrect group on /dev/fd0? "disk" vs "floppy" Brian <ad44@cityscape.co.uk> - 2015-12-18 11:30 +0100
        Re: Incorrect group on /dev/fd0? "disk" vs "floppy" Sven Arvidsson <sa@whiz.se> - 2015-12-17 22:10 +0100

#161823 — Incorrect group on /dev/fd0? "disk" vs "floppy"

FromAnders Andersson <pipatron@gmail.com>
Date2015-12-16 22:20 +0100
SubjectIncorrect group on /dev/fd0? "disk" vs "floppy"
Message-ID<qGrEl-73J-9@gated-at.bofh.it>
Believe it or not, but I still have a floppy disk drive in my
workstation, and I have to use it occasionally! I just noticed that my
user was not allowed to write to /dev/fd0 even though it belongs to
the group "floppy". I found that /dev/fd0 belongs to the group "disk",
and I don't think it should. Granting a user the ability to write to
floppies is not nearly as dangerous as allowing it to write to
everything in the "disk" group.

The problem is that I don't know enough about the system to know where
to report this. Presumably some component in systemd detects this at
startup. This particular system is running Debian Testing. Can anyone
point me in the right direction?

Kind regards,
Anders

[toc] | [next] | [standalone]


#161824

FromUlf Volmer <u.volmer@u-v.de>
Date2015-12-16 23:10 +0100
Message-ID<qGsqJ-7zH-3@gated-at.bofh.it>
In reply to#161823
On 12/16/2015 10:09 PM, Anders Andersson wrote:
> Believe it or not, but I still have a floppy disk drive in my
> workstation, and I have to use it occasionally! I just noticed that my
> user was not allowed to write to /dev/fd0 even though it belongs to
> the group "floppy". I found that /dev/fd0 belongs to the group "disk",
> and I don't think it should. Granting a user the ability to write to
> floppies is not nearly as dangerous as allowing it to write to
> everything in the "disk" group.

Have a look at

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765426

there is a udev rule setting the group to floppy.

best regards
Ulf

[toc] | [prev] | [next] | [standalone]


#161825

FromSven Arvidsson <sa@whiz.se>
Date2015-12-16 23:20 +0100
Message-ID<qGsAp-7D6-5@gated-at.bofh.it>
In reply to#161823

[Multipart message — attachments visible in raw view] — view raw

On Wed, 2015-12-16 at 22:09 +0100, Anders Andersson wrote:
> Believe it or not, but I still have a floppy disk drive in my
> workstation, and I have to use it occasionally! I just noticed that
> my
> user was not allowed to write to /dev/fd0 even though it belongs to
> the group "floppy". I found that /dev/fd0 belongs to the group
> "disk",
> and I don't think it should. Granting a user the ability to write to
> floppies is not nearly as dangerous as allowing it to write to
> everything in the "disk" group.
> 
> The problem is that I don't know enough about the system to know
> where
> to report this. Presumably some component in systemd detects this at
> startup. This particular system is running Debian Testing. Can anyone
> point me in the right direction?

I don't think systemd uses the groups at all. Usb sticks are are in the
disk group here too, and I have no trouble writing to them as a normal
user.

There's a (quite long) bug report about this here, but it seems to be
for systems without systemd:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=751892

-- 
Cheers,
Sven Arvidsson
http://www.whiz.se
PGP Key ID 6FAB5CD5



[toc] | [prev] | [next] | [standalone]


#161826

FromAnders Andersson <pipatron@gmail.com>
Date2015-12-17 01:10 +0100
Message-ID<qGuiS-kX-3@gated-at.bofh.it>
In reply to#161825
On Wed, Dec 16, 2015 at 11:08 PM, Sven Arvidsson <sa@whiz.se> wrote:
> On Wed, 2015-12-16 at 22:09 +0100, Anders Andersson wrote:
>> Believe it or not, but I still have a floppy disk drive in my
>> workstation, and I have to use it occasionally! I just noticed that
>> my
>> user was not allowed to write to /dev/fd0 even though it belongs to
>> the group "floppy". I found that /dev/fd0 belongs to the group
>> "disk",
>> and I don't think it should. Granting a user the ability to write to
>> floppies is not nearly as dangerous as allowing it to write to
>> everything in the "disk" group.
>
> There's a (quite long) bug report about this here, but it seems to be
> for systems without systemd:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=751892

Interesting! I had no idea such a simple case could be so problematic
(or that the maintainers could be so rude). I think that bug report
covers my case well enough. My immediate issue was that I could not
write a disk image to /dev/fd0, and I'm not sure how the solutions
could help me, but really, it's rare enough that I don't mind sudoing.
I just thought it was an interesting regression.

Thanks for the links!

// Anders

[toc] | [prev] | [next] | [standalone]


#161848

FromBrian <ad44@cityscape.co.uk>
Date2015-12-17 20:00 +0100
Message-ID<qGLWq-3f0-9@gated-at.bofh.it>
In reply to#161826
On Thu 17 Dec 2015 at 01:04:43 +0100, Anders Andersson wrote:

> On Wed, Dec 16, 2015 at 11:08 PM, Sven Arvidsson <sa@whiz.se> wrote:
> > On Wed, 2015-12-16 at 22:09 +0100, Anders Andersson wrote:
> >> Believe it or not, but I still have a floppy disk drive in my
> >> workstation, and I have to use it occasionally! I just noticed that
> >> my
> >> user was not allowed to write to /dev/fd0 even though it belongs to
> >> the group "floppy". I found that /dev/fd0 belongs to the group
> >> "disk",
> >> and I don't think it should. Granting a user the ability to write to
> >> floppies is not nearly as dangerous as allowing it to write to
> >> everything in the "disk" group.
> >
> > There's a (quite long) bug report about this here, but it seems to be
> > for systems without systemd:
> > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=751892
> 
> Interesting! I had no idea such a simple case could be so problematic
> (or that the maintainers could be so rude). I think that bug report
> covers my case well enough. My immediate issue was that I could not
> write a disk image to /dev/fd0, and I'm not sure how the solutions
> could help me, but really, it's rare enough that I don't mind sudoing.
> I just thought it was an interesting regression.

I don't think any of the solutions do help you to write to a raw device,
whether it be a floppy or a USB stick. Writing a Debian ISO to USB is
not uncommon here and I do not appreciate having to be root to do it. A
mistake in one letter in the command could ruin your day.

Those who do not have root privileges don't even have the opportunity to
wipe their hard disk, or dd an installation image to a removable device
to pass on to an interested friend. If the thinking behind the change
had been *explained* one could be more sypathetic to it. 

[toc] | [prev] | [next] | [standalone]


#161852

FromSven Arvidsson <sa@whiz.se>
Date2015-12-17 22:00 +0100
Message-ID<qGNOy-4t5-7@gated-at.bofh.it>
In reply to#161848

[Multipart message — attachments visible in raw view] — view raw

On Thu, 2015-12-17 at 18:56 +0000, Brian wrote:
> I don't think any of the solutions do help you to write to a raw
> device,
> whether it be a floppy or a USB stick. Writing a Debian ISO to USB is
> not uncommon here and I do not appreciate having to be root to do it.
> A
> mistake in one letter in the command could ruin your day.

dd'ing an image to a raw device does require root. 

> Those who do not have root privileges don't even have the opportunity
> to
> wipe their hard disk, or dd an installation image to a removable
> device
> to pass on to an interested friend. If the thinking behind the change
> had been *explained* one could be more sypathetic to it. 

The rest here does not, changing labels, formatting, creating
partitions, mounting images etc. works with udisks.

Writing ISO to USB could also be done through udisks presumably? 

-- 
Cheers,
Sven Arvidsson
http://www.whiz.se
PGP Key ID 6FAB5CD5



[toc] | [prev] | [next] | [standalone]


#161854

From"Thomas Schmitt" <scdbackup@gmx.net>
Date2015-12-17 22:40 +0100
Message-ID<qGOrg-4Wi-5@gated-at.bofh.it>
In reply to#161852
Hi,

Sven Arvidsson wrote:
> Writing ISO to USB could also be done through udisks presumably? 

A safe method which distinguishes removable media from
the fixely installed disks would be of great interest for
  https://www.debian.org/CD/faq/#write-usb


Have a nice day :)

Thomas

[toc] | [prev] | [next] | [standalone]


#161855

FromRandom832 <random832@fastmail.com>
Date2015-12-17 23:00 +0100
Message-ID<qGOKC-53D-17@gated-at.bofh.it>
In reply to#161852
Sven Arvidsson <sa@whiz.se> writes:
> dd'ing an image to a raw device does require root.

Why? If it's a removable device and not a system filesystem, it
wouldn't be unreasonable to give such access to anyone logged in
at the console, on the grounds that they could otherwise take
the device away and write it on their other system where they do
have root access.

[toc] | [prev] | [next] | [standalone]


#161860

FromBrian <ad44@cityscape.co.uk>
Date2015-12-18 11:30 +0100
Message-ID<qH0sq-4lf-33@gated-at.bofh.it>
In reply to#161852
On Thu 17 Dec 2015 at 21:55:48 +0100, Sven Arvidsson wrote:

> On Thu, 2015-12-17 at 18:56 +0000, Brian wrote:
> > I don't think any of the solutions do help you to write to a raw
> > device, whether it be a floppy or a USB stick. Writing a Debian ISO
> > to USB is not uncommon here and I do not appreciate having to be
> > root to do it.  A mistake in one letter in the command could ruin
> > your day.
> 
> dd'ing an image to a raw device does require root. 

Which raises the question of what benefit there is to the installer
putting the first created user in group floppy.

> > Those who do not have root privileges don't even have the
> > opportunity to wipe their hard disk, or dd an installation image to
> > a removable device to pass on to an interested friend. If the
> > thinking behind the change had been *explained* one could be more
> > sypathetic to it. 
> 
> The rest here does not, changing labels, formatting, creating
> partitions, mounting images etc. works with udisks.

udisksctl takes care of mounting from the command line. I'm not aware of
similar commands for the remaining three operations.
 
> Writing ISO to USB could also be done through udisks presumably?

I imagine so, but have never tried. A 91-permissions.rules file in
/etc/udev/rules.d

with

  SUBSYSTEM=="block", ATTRS{removable}=="1",      GROUP="floppy"

is easy enough.

If you cat, dd or cp to a removable raw device as root a good habit to
cultivate is to read from the device first and watch for the blinking
LED:

  dd if=/dev/sdb of=/dev/null count=100000

This tip is courtesy of

  https://lists.debian.org/debian-devel/2012/05/msg00748.html

[toc] | [prev] | [next] | [standalone]


#161853

FromSven Arvidsson <sa@whiz.se>
Date2015-12-17 22:10 +0100
Message-ID<qGNYe-4LR-21@gated-at.bofh.it>
In reply to#161826

[Multipart message — attachments visible in raw view] — view raw

On Thu, 2015-12-17 at 01:04 +0100, Anders Andersson wrote:
> Interesting! I had no idea such a simple case could be so problematic
> (or that the maintainers could be so rude). I think that bug report
> covers my case well enough. My immediate issue was that I could not
> write a disk image to /dev/fd0, and I'm not sure how the solutions
> could help me, but really, it's rare enough that I don't mind
> sudoing.
> I just thought it was an interesting regression.

If sudo becomes a chore you could write a simple udev rule that adds
back the floppy group, just to /dev/fd0, or relaxes the permissions.

The bug report mentioned that adding back the full rule was a bad idea,
but I think it would be safe for just the floppy 

(But don't hold me to it! :) )

-- 
Cheers,
Sven Arvidsson
http://www.whiz.se
PGP Key ID 6FAB5CD5



[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web