9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] u9fs CD installation
@ 1998-04-21  4:06 Russ
  0 siblings, 0 replies; 3+ messages in thread
From: Russ @ 1998-04-21  4:06 UTC (permalink / raw)


First, the moderator (Scott?) might want to look into why this
message has 2 Reply-To: lines.  You would think majordomo would
replace it instead of blindly adding its own.

> given that the Wstat documentation explicitly states that
> file ownership cannot be changed..

Anyhow, despite the documentation, both kfs and the file server
allow chown via wstat if in you've done 'kfscmd allow' or by booting
the file server in insecure mode, respectively.  (For normal operation,
the documentation is correct.)

That's how the install procedure sets up the owners correctly initially.

As for u9fs, it looks like it should work but obviously doesn't.

> I have verified that fchown is called and always succeeds,

The install procedure (/sys/lib/pcdist/src/build.c) stats the
source file and then wstats the dest file, so you should be checking the
chown call in rwstat(), not the fchown's in rcreate().

> but it is always passed the sime user.

Right.  You're looking at the create calls, which don't do the setting
of other owners.

Russ




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [9fans] u9fs CD installation
@ 1998-04-21 16:36 Digby
  0 siblings, 0 replies; 3+ messages in thread
From: Digby @ 1998-04-21 16:36 UTC (permalink / raw)


>
>Anyhow, despite the documentation, both kfs and the file server
>allow chown via wstat if in you've done 'kfscmd allow' or by booting
>the file server in insecure mode, respectively.  (For normal operation,
>the documentation is correct.)
>
>That's how the install procedure sets up the owners correctly initially.
>
>As for u9fs, it looks like it should work but obviously doesn't.
>
Aha!, got it.

Thanks - that pointer regarding chowning after the initial create
got me looking in the right place.

The rwstat() routine in u9fs silently ignores any attempt to change 
the file owner under all circumstances.

I had to implement am 'allow' option in u9fs to allow the CD installation
procedure to create my file system properly. This option has to enable
the setting of file ownership, and also disable all other permission
checking so that the changed files remain accessible to the install
program.

I am running u9fs in a chrooted environment, so this is probably not
too dangerous.

Presumably I could make this am attach specifier like the 'device'
access enabling one, but for now it is a command line option for
two reasons:
1.	The install program would need to know to use it
2.	It is probably more secure to only be able to enable this
    by being super user on the file server.

I guess, given that this problem hasn't been found before, that this
mode of installation isn't attempted very often. But if anyone
else is interested, I will tidy it up and make it available.

Regards,
DigbyT
-- 
Digby R. S. Tarvin                                              digbyt@acm.org
http://www.cthulhu.dircon.co.uk




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [9fans] u9fs CD installation
@ 1998-04-21  3:27 Digby
  0 siblings, 0 replies; 3+ messages in thread
From: Digby @ 1998-04-21  3:27 UTC (permalink / raw)


I have been tinkering with installing my CD distribution on
on a Unix based file server using u9fs.

Everything seems to work, except that the files all end up
owned by 'none', which is not ideal. I have verified that
fchown is called and always succeeds, but it is always
passed the sime user.

Anyone have any ideas? I am not really sure how the installation
program is supposed to set install things with the correct
owner, given that the Wstat documentation explicitly states that
file ownership cannot be changed...

Regards,
DigbyT
-- 
Digby R. S. Tarvin                                              digbyt@acm.org
http://www.cthulhu.dircon.co.uk




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-04-21 16:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-04-21  4:06 [9fans] u9fs CD installation Russ
  -- strict thread matches above, loose matches on Subject: below --
1998-04-21 16:36 Digby
1998-04-21  3:27 Digby

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).