Strange mounting issue with ext3
Ludwig Nussel
ludwig.nussel at suse.de
Tue Apr 7 06:43:38 PDT 2009
Roderich Schupp wrote:
> On Tue, Apr 7, 2009 at 11:27 AM, Patryk Zawadzki <patrys at pld-linux.org> wrote:
> > The proper solution is to make the root of the filesystem owned and/or
> > writable by your user of choice. This is the part you should do after
>
> This is the traditional Unix answer. But this predates drives as easily
> movable around as an USB stick, because it assumes the user
> (1) has an account on every machine she wants to mount the stick on
> and (2) this account has the _same_ uid on every machine (because
> it's the uid that's stored in the filesystem on the media).
>
> What is needed here is a new mount option: "forget about the
> uids on the drive, just pretend any file is owned by the mounting user".
I had that idea years ago already but never came around actually
implementing something acceptable for inclusion in the kernel.
I'll attach the PoC ext2 patch I made back then for reference. It
only fakes the uid for files owned uid 0 and also writes back files
with uid 0. This has the advantage that on unpatched systems files
are consistently owned by root rather than a mixture of uids.
A more generic implementation would do it at higher level instead of
a specific file system I guess. A special mount option wouldn't be
needed either, the generic implementation just needs to catch the
uid option that already exists for some file systems. I suppose
someone who is into kernel development and has some vfs knowledge
could implement that feature on a recent kernel in a few minutes.
cu
Ludwig
--
(o_ Ludwig Nussel
//\
V_/_ http://www.suse.de/
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ext2-maproot.diff
Type: text/x-patch
Size: 3070 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20090407/0605b7de/attachment-0001.bin
More information about the hal
mailing list