Unix Permissions

Jay plug-discuss@lists.plug.phoenix.az.us
Tue, 23 Jul 2002 18:52:36 -0700 (MST)


On Tue, 23 Jul 2002, George Toft wrote:

> Total of 9 users: 5 read only, 4 read/write.


I think it would still work. You would just have the read-only users in
the "read" group, and the read-write users in both the "read" and the
"write" groups.

That being said, I think my solution (using the SGID bit) is nifty and
all, but I much prefer the clean-ness of James Durham's proposed solution
(using the non-execute bit to keep people out of the directory).

~Jay




>
> George
>
>
>
> Jay wrote:
> >
> > Hmmm...this is a good one. Not 100% sure (I don't have time right now to
> > test all the possibilities), but how about:
> >
> > * The file in question is called "file" and it is located in "directory"
> >
> > * There are users 1, 2, 3, 4, and 5.
> >
> > * Users 1-4 are in the "read" and "write" groups and user 5 is only in the
> > "read" group
> >
> > With the above scenario, this might work:
> >
> > chown root:write /directory/
> > chown root:read /directory/file
> > chmod 0750 /directory/file
> > chmod 2751 /directory/
> >
> > The SGID bit on /directory/ should allow users in the "write" group to
> > override it's unwritable permissions. I think... :)
> >
> > ???
> >
> > ~Jay
> >
> > On Tue, 23 Jul 2002, George Toft wrote:
> >
> > > I was given this puzzle, and told it cannot be solved using Unix:
> > >
> > > You have a file that needs protected from prying eyes.  You must allow
> > > only 5 people read access, and 4 people read/write access.  The rest of
> > > the world cannot be allowed to view it.  What set of Unix permissions
> > > and ownership can support this?
> > >
> > > George
> > > ________________________________________________
> > > See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't post to the list quickly and you use Netscape to write mail.
> > >
> > > PLUG-discuss mailing list  -  PLUG-discuss@lists.plug.phoenix.az.us
> > > http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
> > >
> >
> > --
> > ~Jay
> >
> > ________________________________________________
> > See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't post to the list quickly and you use Netscape to write mail.
> >
> > PLUG-discuss mailing list  -  PLUG-discuss@lists.plug.phoenix.az.us
> > http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't post to the list quickly and you use Netscape to write mail.
>
> PLUG-discuss mailing list  -  PLUG-discuss@lists.plug.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>

-- 
~Jay