9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] what a mess the Unix world has become
@ 2003-02-09 10:05 Aharon Robbins
  2003-02-09 19:48 ` Mike Haertel
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Aharon Robbins @ 2003-02-09 10:05 UTC (permalink / raw)
  To: 9fans

I forward this for the amusement of the list members.  My initial
reply to this question was that the "Unix guru gives up in disgust
and moves to Plan 9."  Would that I could.

Arnold

> Date: Sat, 8 Feb 2003 09:37:50 -0700 (MST)
> Subject: Readable files: a Unix philosophy question for gurus
>
> In "man test", we find this documentation:
>
>        -r FILE
>               FILE exists and is readable
>
> Similar wording appears in vendor man pages, although Compaq OSF/1
> is a bit more precise:
>
>        -r file
>            TRUE if file exists and has read permission.
>
> Consider a file with these permissions:
>
> 	% ls -l foo.xml
> 	-rwSr-Srwx    2 beebe    staff      174440 Feb  8 08:20 foo.xml
>
> created by
>
> 	chmod u+s,g+s,o+rwxt foo.xml
>
> Now look at this:
>
> (1) On the file server:
>
> 	/bin/test -r foo.xml && echo file is readable
> 	file is readable
>
> 	/usr/local/bin/test -r foo.xml && echo file is readable
> 	file is readable
>
> 	/usr/local/bin/test --version
> 	test (GNU coreutils) 4.5.6
> 	...
>
> 	/bin/cat foo.xml > /dev/null
>
> 	echo $?
> 	0
>
> (2) On a [Sun Solaris 2.8] client, where the filesystem is mounted via
>     NFS with the attributes remote/read/write/nosuid/grpid/intr/noquota:
>
> 	/bin/test -r foo.xml && echo file is readable
> 	[no output]
>
> 	/usr/local/bin/test -r foo.xml && echo file is readable
> 	file is readable
>
> 	/bin/cat foo.xml > /dev/null
> 	cat: cannot open foo.xml
>
> 	/usr/local/bin/cat foo.xml > /dev/null
> 	/usr/local/bin/cat: foo.xml: Permission denied
>
> 	echo $?
> 	1
>
> The $65,536 question is: what should test report?  In this case, the
> setuid bit combined with the mount options makes the file unreadable,
> and the Solaris test command reflects that, but the GNU coreutils
> one does not.
>
> Experiments with native test on other systems produced these results:
>
> 	SGI IRIX 6.5:		file is readable, cat fails
> 	Compaq OSF/1 4.0:	no output from test, cat fails
>
> On AIX, my home filesystem is not mounted with special attributes, so
> I could not make the same experiment.
>
> On FreeBSD, chmod would not do g+s or o+t for me, and the file
> remained readable for both test and cat.
>
> My feeling is that the GNU version of test (going back to at least
> sh-utils 2.0.11 on Red Hat 7.2, and likely much earlier), and the IRIX
> version too, are wrong.
>
> I think that one really should be able to do "test -r foo && cat foo"
> without cat failing because of permissions.
>
> Comments?


^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: [9fans] what a mess the Unix world has become
@ 2003-02-10 16:19 C H Forsyth
  2003-02-10 20:26 ` Ronald G. Minnich
  0 siblings, 1 reply; 21+ messages in thread
From: C H Forsyth @ 2003-02-10 16:19 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 129 bytes --]

i don't quite see how they could provide a `commit' effect unless they finally
added a Close operation to the clunky protocol.

[-- Attachment #2: Type: message/rfc822, Size: 2625 bytes --]

From: "Ronald G. Minnich" <rminnich@lanl.gov>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] what a mess the Unix world has become
Date: Mon, 10 Feb 2003 08:20:07 -0700 (MST)
Message-ID: <Pine.LNX.4.44.0302100818320.23236-100000@carotid.ccs.lanl.gov>

On Mon, 10 Feb 2003, Douglas A. Gwyn wrote:

>There are
> transaction-oriented filesystems (MUMPS comes to mind)
> that cluster requests until a "commit" and implement a
> well-defined rollback scheme when the commit is
> unsuccessful.

Actually at some point in the 90s NFS became like that on SunOS (well,
minus the rollback system). That was about the time that close could
return an error, meaning "remember those writes you did yesterday? Well,
some of them may not have worked out, so you probably lost data. Have a
nice day."

Needless to say, many programs did not quite grasp the concept.

ron

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

end of thread, other threads:[~2003-02-13  9:02 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-09 10:05 [9fans] what a mess the Unix world has become Aharon Robbins
2003-02-09 19:48 ` Mike Haertel
2003-02-10  9:00 ` [9fans] mpg123 Conor Williams
2003-02-10 12:02   ` Russ Cox
2003-02-10 14:14   ` Nigel Roles
2003-02-10 14:34     ` Fco.J.Ballesteros
2003-02-10 14:53       ` Axel Belinfante
2003-02-10 15:05         ` Fco.J.Ballesteros
2003-02-10 15:53       ` Conor Williams
2003-02-10 16:41         ` Fco.J.Ballesteros
2003-02-11 10:19     ` Conor Williams
2003-02-11 11:26       ` nigel
2003-02-13  9:02         ` Conor Williams
2003-02-10 18:13   ` Tad Hunt
2003-02-10 10:04 ` [9fans] what a mess the Unix world has become Douglas A. Gwyn
2003-02-10 11:58   ` Russ Cox
2003-02-10 15:20   ` Ronald G. Minnich
2003-02-11  9:29     ` Douglas A. Gwyn
2003-02-11 10:25       ` Geoff Collyer
2003-02-10 16:19 C H Forsyth
2003-02-10 20:26 ` Ronald G. Minnich

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