mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "John Stoffel" <john@stoffel.org>
To: Jamie Lokier <jamie@shareable.org>
Cc: John Stoffel <john@stoffel.org>, Andreas Dilger <adilger@sun.com>,
	Ludwig Nussel <ludwig.nussel@suse.de>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] implement uid mount option for ext2
Date: Mon, 27 Jul 2009 10:56:05 -0400	[thread overview]
Message-ID: <19053.49157.984140.286148@stoffel.org> (raw)
In-Reply-To: <20090724231658.GM27755@shareable.org>

>>>>> "Jamie" == Jamie Lokier <jamie@shareable.org> writes:

Sorry for the delay, I was out of it this weekend... :]

Jamie> John Stoffel wrote:
>> I didn't read the original email closely, but I have to say that both
>> of these plans don't sound good to me.  If you can mount a filesystem,
>> you're root already, so you can do any fixup you need.

Jamie> What if someone lends you a 1TB disk, for you to browse it in
Jamie> your favourite GUI or Shell Window to read some files from it?
Jamie> And you're to put a couple of files on it before you give it
Jamie> back?

So?  How is the kernel supposed to know you're doing this?

Jamie> Hotplug scripts run as root to mount it, and you have your GUI
Jamie> / Shell Window which don't run as root to read and write a few
Jamie> of those files.

Jamie> You must not chown anything on the disk, because it isn't your
Jamie> disk.

Umm... this doesn't make sense.  If it's not your disk, why are you
writing to it?  And how is chown different? 

The real answer is that your buddy should have setup a mode 777
directory on there where random stuff could be dropped.  Again, a
userspace issue, not kernel.

>> But in that case, you're screwed anyway and it's going to become
>> un-manageable.  Push this to userspace, not the kernel since it's a
>> userspace issue when you come right down to it.

Jamie> How do you handle the above scenario in userspace?

You certainly can't handle this in kernel space!  If you just plug in
a random disk, and it comes up with borked UIDs because the original
server it came from has a different setup than yours for UID/GIDs,
then you're going to have to do *something* in a manual manner to fix
it.

Either you need to 'sudo chown -R user /media/disk/' or better yet
just mkdir a new directory with appropriate permissions and then write
using your GUI/shell-window, non-root user account to that new
directory.

Putting in a mount option like this is just begging for all kinds of
issues.

John


  reply	other threads:[~2009-07-27 14:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-23 11:36 [PATCH 0/2] implement uid mount option for ext2 and ext3 Ludwig Nussel
2009-07-23 11:36 ` [PATCH 1/2] implement uid mount option for ext2 Ludwig Nussel
2009-07-23 11:36   ` [PATCH 2/2] implement uid mount option for ext3 Ludwig Nussel
2009-07-23 14:37 ` [PATCH 0/2] implement uid mount option for ext2 and ext3 Randy Dunlap
2009-07-23 21:23 ` Valdis.Kletnieks
2009-07-24 10:23   ` Ludwig Nussel
2009-07-30  9:07     ` Pavel Machek
2009-07-24 10:30 ` [PATCH 0/2] implement uid mount option for ext2 and ext3, try 2 Ludwig Nussel
2009-07-24 10:30   ` [PATCH 1/2] implement uid mount option for ext2 Ludwig Nussel
2009-07-24 10:30     ` [PATCH 2/2] implement uid mount option for ext3 Ludwig Nussel
2009-07-24 16:52     ` [PATCH 1/2] implement uid mount option for ext2 Andreas Dilger
2009-07-24 18:58       ` John Stoffel
2009-07-24 23:16         ` Jamie Lokier
2009-07-27 14:56           ` John Stoffel [this message]
2009-07-25 15:44       ` Ludwig Nussel
2009-07-27 19:14         ` Andreas Dilger
2009-07-28  7:50           ` Ludwig Nussel
2009-07-28 11:01 ` [PATCH 0/2] implement uid mount option for ext2 and ext3, try 3 Ludwig Nussel
2009-07-28 11:01   ` [PATCH 1/2] implement uid and gid mount options for ext2 Ludwig Nussel
2009-07-28 11:01     ` [PATCH 2/2] implement uid and gid mount options for ext3 Ludwig Nussel
2009-07-28 18:11   ` [PATCH 0/2] implement uid mount option for ext2 and ext3, try 3 Andreas Dilger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19053.49157.984140.286148@stoffel.org \
    --to=john@stoffel.org \
    --cc=adilger@sun.com \
    --cc=jamie@shareable.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ludwig.nussel@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®