From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: erik quanstrom Date: Fri, 5 Jun 2009 01:40:22 -0400 To: 9fans@9fans.net In-Reply-To: <20090605062307.71296ee0.eekee57@fastmail.fm> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Subject: Re: [9fans] Drawterm /mnt/term permissions issue Topicbox-Message-UUID: 04bc90b2-ead5-11e9-9d60-3106f5b1d025 On Fri Jun 5 01:21:25 EDT 2009, eekee57@fastmail.fm wrote: > On Thu, 4 Jun 2009 17:23:08 -0700 > Russ Cox wrote: > > > On Thu, Jun 4, 2009 at 4:58 PM, Ethan Grammatikidis 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