9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] Drawterm /mnt/term permissions issue
Date: Fri,  5 Jun 2009 01:40:22 -0400	[thread overview]
Message-ID: <b1a793b46c52457468536c08307b610e@quanstro.net> (raw)
In-Reply-To: <20090605062307.71296ee0.eekee57@fastmail.fm>

On Fri Jun  5 01:21:25 EDT 2009, eekee57@fastmail.fm wrote:
> On Thu, 4 Jun 2009 17:23:08 -0700
> Russ Cox <rsc@swtch.com> wrote:
>
> > On Thu, Jun 4, 2009 at 4:58 PM, Ethan Grammatikidis <eekee57@fastmail.fm> wrote:
> > > I run a plan 9 cpu server in Qemu and use drawterm to connect from the Linux host.
> > > I thought the /mnt/term mechanism would be very convenient for exchanging files
> > > between host & guest, but the guest sees all user/group names as
> > > unknown/unknown, preventing writing.
> >
> > That's surprising.  Drawterm isn't going around enforcing
> > permission bits: if it can write, it writes.  What it shows
> > you in ls is what it gets from stat, but it doesn't rely on
> > that to make decisions about what you can open.  It just
> > tries to open it.
>
> Oh now I get it: drawterm isn't enforcing permissions ,,,

correct,

> but the plan 9 kernel is, on seeing a dir with user/group = unknown/unknown and perms bits = 755 it won't allow creation within that dir. At least, I assume that's what's going on.

incorrect.  the linux kernel is checking the file's permissions against the
euid/egid of the drawterm process.

unknown/unknown are just filler that drawterm provides.  perhaps it
should say "(this space reserved for a user name if we had one)", but
that would be rather long and would break the general convention that
usernames in plan 9 do not have spaces or punctuation.

(bonus points for the first explot by a fs injecting shell script goo
into user/group name.  ☺)

- erik



  reply	other threads:[~2009-06-05  5:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-04 23:58 Ethan Grammatikidis
2009-06-05  0:23 ` Russ Cox
2009-06-05  5:20   ` Ethan Grammatikidis
2009-06-06 18:39     ` Skip Tavakkolian
2009-06-05  5:23   ` Ethan Grammatikidis
2009-06-05  5:40     ` erik quanstrom [this message]
2009-06-05  8:14 ` sqweek
2009-06-05 13:09   ` [9fans] I fail at bind WAS: " Ethan Grammatikidis

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=b1a793b46c52457468536c08307b610e@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /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;
as well as URLs for NNTP newsgroup(s).