[GTALUG] Adding all users to the "disk" group: bad idea, or terrible idea?

Chris Tyler chris at tylers.info
Thu Feb 20 16:11:47 EST 2020


Stewart, I'm having troubles understanding the author's reply to the SGID
suggestion. What I was proposing was to set things up with a command like
this (executed just once):

  BINARY=/path/to/binary ; sudo chmod 02711 $BINARY ; sudo chown root:disk
$BINARY

...Which would mean that the user would have their effective group ID
changed to 'disk' only while the binary was running. This means that,
during program execution, it would be have the same level of access as if
the user belonged to the 'disk' group; however, this would drop back to
their previous group membership when the binary exited. As a bonus, you
don't have to change the system group memberships. (The program in question
should, of course, guard against writing to the wrong device while it's
running, and prevent shell-outs).

-Chris


On Tue, Feb 18, 2020 at 8:27 AM Stewart C. Russell via talk <talk at gtalug.org>
wrote:

> Hey, thanks to all who responded. I'm sticking with merely "bad idea",
> as it would also give the user block-level access to everyone's secret
> files. I know sudo already does this, but one has to manually clunk into
> that mode. Though there are still plenty of Raspberry Pi users who 'sudo
> ls', for some reason.
>
> On 2020-02-17 7:23 p.m., Chris Tyler wrote:
> > Wouldn't it be better to use SGID to enable access to disk devices only
> > for the duration of that program's execution?
>
> Author claims it's not possible. The program was written as a reaction
> to finding out that balenaEtcher (https://www.balena.io/etcher/) "phones
> home" with usage data. If true, this is unfortunate, because Etcher
> fixes all the fiddliness of using dd as root, it's truly cross platform,
> and avoids the Windows unzip bug. No-one's yet identified what exactly
> Etcher phones home yet, but that hasn't stopped the heat, light and fury
> of a Free Software Cause in the making …
>
> The new program's quite usable for now (even if you have to run it sudo)
> and appears to be cross-platform too. It's also a lot smaller than
> Etcher, which is an Electron app.
>
> Source repo is here: https://gitlab.com/bztsrc/usbimager
> ---
> Post to this mailing list talk at gtalug.org
> Unsubscribe from this mailing list
> https://gtalug.org/mailman/listinfo/talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/talk/attachments/20200220/849e3779/attachment.html>


More information about the talk mailing list