[tahoe-dev] Warning or error when running Tahoe as root

David-Sarah Hopwood david-sarah at jacaranda.org
Fri Aug 3 03:13:06 UTC 2012


On 02/08/12 19:39, markus reichelt wrote:
> * David-Sarah Hopwood <david-sarah at jacaranda.org> wrote:
> 
>> There's an argument for saying that this shouldn't just be a
>> warning; it should be an error, because running as root once may
>> already do things that need to be undone (e.g.  creating files
>> owned by root, as in the case that motivated the ticket).
> 
> Maybe I missed it but which install type was it all about? A
> system-wide install or a mere user-install?

The OP (Two Spirit) didn't say. But it shouldn't matter, since
'tahoe' should not run as or create files as root by default, whether
or not it is a system install.

> A line like this, placed somewhere strategically in the quickstart
> document, would have some merit for the folks testing Tahoe (on a
> glacier but somehow misplaced their winter walking boots):
> 
> All Things Tahoe Are Best Served From A Single User.
> (or somesuch wording that reflects its meaning)

I think that's an overspecification. tahoe doesn't behave differently
with respect to permissions than any other program on the same
operating system (although Unix and Windows obviously have different
permission models).

>> If we made it an error then we could add an --allow-root option to
>> suppress it; is that necessary, or overcomplicated?
> 
> If you make it an error, please add the Han Solo switch ("I know."),
> and include it in the error message.

OK.

> Oh and how do you plan on checking whether Tahoe is actually running
> as root?  I wouldn't just parse for root but actually check group
> id/groups as well.

geteuid() == 0

I don't think it's necessary to check the effective gid, is it?

-- 
David-Sarah Hopwood ⚥

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 554 bytes
Desc: OpenPGP digital signature
URL: <http://tahoe-lafs.org/pipermail/tahoe-dev/attachments/20120803/a2c934e9/attachment.pgp>


More information about the tahoe-dev mailing list