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