9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: northern snowfall <dbailey27@ameritech.net>
To: andrey mirtchovski <mirtchov@cpsc.ucalgary.ca>
Cc: 9fans@cse.psu.edu, northern snowfall <dbailey27@Ameritech.Net>
Subject: Re: [9fans] bind -c[ab] -- what am I doing wrong?
Date: Thu, 17 Jul 2003 15:09:06 -0500	[thread overview]
Message-ID: <3F170262.90707@ameritech.net> (raw)

>
>
>well, it doesn't. what you describe is the bahaviour of the command
>according to the  man page. but here's what I observe:
>
Yeh, and what is in the man page is what happens in usage:
but only in my examples. See, this is why I shouldn't get
to check mail until I've had my cranberry juice.

This is what really seems to happen:

The first directory bound into another forces the first
to inherit the second's creation properties. Thus, when we
bind a directory of ours onto a system file, we maintain
write access.

However, when a file that we do not have write access to
is bound into a directory we do have write access to, the
permissions inherited deny creation. This is your example,
Andrey. Though, we can easily remedy this situation by
binding a writable directory over the unwritable:
    cpu% bind -ac /sys/src/cmd try
    cpu% touch try/hello
    touch: try/hello: cannot create: access permission denied
    cpu% mkdir try2
    cpu% bind -ac try2 try
    cpu% touch try/hello
    touch: try/hello: cannot create: access permission denied
    cpu% unmount try2 try
    cpu% bind -bc try2 try
    cpu% touch try/hello
    cpu% wc -l try/unmount.c
         26 try/unmount.c
    cpu%

So the chain context persists, yet is not refinfluenced
by the preemptive bind. However, this doesn't change the
state of 'try'. Its permissions are still influenced by
the first bound directory. Our perception sees creation
is allowed, and that is all we technically care about.
Though, files are generated under the second bound
directory:
    cpu% unmount try
    cpu% ls -l try/hello
    ls: try/hello: 'try/hello' does not exist
    cpu% ls -l try2/hello
    --rw-rw-r-- M 2278 snowfall snowfall 0 Jul 17 13:49 try2/hello
    cpu%

Don

http://www.7f.no-ip.com/~north_










             reply	other threads:[~2003-07-17 20:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-17 20:09 northern snowfall [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-07-17 17:30 Richard C Bilson
2003-07-17 16:13 andrey mirtchovski
2003-07-17 17:42 ` northern snowfall
2003-07-17 17:10   ` andrey mirtchovski
2003-07-17 17:18     ` boyd, rounin
2003-07-17 17:34       ` andrey mirtchovski
2003-07-17 17:37         ` David Presotto
2003-07-17 17:45         ` boyd, rounin
2003-07-17 18:07           ` andrey mirtchovski
2003-07-17 17:35       ` David Presotto

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=3F170262.90707@ameritech.net \
    --to=dbailey27@ameritech.net \
    --cc=9fans@cse.psu.edu \
    --cc=mirtchov@cpsc.ucalgary.ca \
    /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).