<div dir="ltr">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):<div><br></div><div>  BINARY=/path/to/binary ; sudo chmod 02711 $BINARY ; sudo chown root:disk $BINARY</div><div><br></div><div>...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).</div><div><br></div><div>-Chris</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 18, 2020 at 8:27 AM Stewart C. Russell via talk <<a href="mailto:talk@gtalug.org">talk@gtalug.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hey, thanks to all who responded. I'm sticking with merely "bad idea", <br>
as it would also give the user block-level access to everyone's secret <br>
files. I know sudo already does this, but one has to manually clunk into <br>
that mode. Though there are still plenty of Raspberry Pi users who 'sudo <br>
ls', for some reason.<br>
<br>
On 2020-02-17 7:23 p.m., Chris Tyler wrote:<br>
> Wouldn't it be better to use SGID to enable access to disk devices only <br>
> for the duration of that program's execution?<br>
<br>
Author claims it's not possible. The program was written as a reaction <br>
to finding out that balenaEtcher (<a href="https://www.balena.io/etcher/" rel="noreferrer" target="_blank">https://www.balena.io/etcher/</a>) "phones <br>
home" with usage data. If true, this is unfortunate, because Etcher <br>
fixes all the fiddliness of using dd as root, it's truly cross platform, <br>
and avoids the Windows unzip bug. No-one's yet identified what exactly <br>
Etcher phones home yet, but that hasn't stopped the heat, light and fury <br>
of a Free Software Cause in the making …<br>
<br>
The new program's quite usable for now (even if you have to run it sudo) <br>
and appears to be cross-platform too. It's also a lot smaller than <br>
Etcher, which is an Electron app.<br>
<br>
Source repo is here: <a href="https://gitlab.com/bztsrc/usbimager" rel="noreferrer" target="_blank">https://gitlab.com/bztsrc/usbimager</a><br>
---<br>
Post to this mailing list <a href="mailto:talk@gtalug.org" target="_blank">talk@gtalug.org</a><br>
Unsubscribe from this mailing list <a href="https://gtalug.org/mailman/listinfo/talk" rel="noreferrer" target="_blank">https://gtalug.org/mailman/listinfo/talk</a><br>
</blockquote></div>