help-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 4th set of permission bits?


From: Marcus Brinkmann
Subject: Re: 4th set of permission bits?
Date: Fri, 1 Dec 2000 13:32:25 +0100
User-agent: Mutt/1.1.4i

On Fri, Dec 01, 2000 at 08:05:38PM +0800, Robert Marlow wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hmm... I keep reading over and over and I don't see how my idea doesn't
> work... maybe an example and you can show me where it is flawed.
> 
> say a file begins with the permissions following:
> 
> rwxr-xr-xr-x
> 
> ie, the last 3 bits for the non logged-in user is defaulted to
> the same as that of worlds (the 2nd set of 3 bits).

Explain to me how this "is defaulted to" should work in your opinion.
Defaulted to by whom? At which time?
 
> Then a user, who doesn't care about setting the non logged-in user's
> permissions any differently to worlds simply executes chmod as if
> the non logged-in user wasn't an issue:
> 
> chmod 700
> 
> The outcome would be the following because the non logged-in user
> defaults to the same permissions as world's by design
> 
> rwx---------
> 
> Otherwise, if a user wanted the non logged-in user to have different
> permissions they could specify them. Something like this (though
> it would have to be modified to avoid confusion with things like
> sticky bits) could be used
> 
> chmod 7550
> 
> giving permissions of
> 
> rwxr-xr-x---
> 
> So basically what I'm getting at is there's no need for the extra
> bit that I can see - the last 3 set of permissions is ALWAYS used
> by the non logged-in user.

That would be okay so far.

> But if specifying permissions for that
> user isn't necessary, they just default to being the same as that
> of world's.

This is exactly what the extra bit is for. It determines if "specifying
permissions for that user" is necessary or not. Otherwise the default would
have to be ---.

> This way the permissions for the non logged-in user
> is always independant of that of world's. The decision just lies
> in whether or not to specify permissions for that user separately
> or not. If there is something I'm still missing, please show
> me the counterexample of why what I'm thinking wouldn't work.

The problem is that you can't say use the world's bit as a default if
nothing else is specified, as for every chmod() you have to specify all
permission flags, as well as for every open() with O_CREAT. The "default"
would be ---, which is probably not what you want if you don't want the
not-logged in user to be anything special.

Is that more clear? The way you see it it would work, but there would be no
way to say that the default should be the same as world. That's why we have
the extra bit, to say "independant" or "default to world".

Marcus



-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]