From owner-freebsd-bugs Fri Apr 12 05:52:37 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id FAA00433 for bugs-outgoing; Fri, 12 Apr 1996 05:52:37 -0700 (PDT) Received: from vanuata.dcs.gla.ac.uk (vanuata.dcs.gla.ac.uk [130.209.240.50]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id FAA00211 Fri, 12 Apr 1996 05:49:08 -0700 (PDT) Message-Id: <199604121249.FAA00211@freefall.freebsd.org> Received: from hawaii.dcs.gla.ac.uk by vanuata.dcs.gla.ac.uk with LOCAL SMTP (PP); Fri, 12 Apr 1996 13:48:13 +0100 To: "Marc G. Fournier" cc: Mike Pritchard , freebsd-bugs@freefall.freebsd.org Subject: Re: kern/876 In-reply-to: Your message of "Thu, 11 Apr 1996 18:07:22 EDT." Date: Fri, 12 Apr 1996 13:48:10 +0100 From: Simon Marlow Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > ---[ begin ]--- > > freebsd# ls -lt CVS-routine > -rw------- 1 scrappy wheel 2392 Mar 26 14:32 CVS-routine > freebsd# more CVS-routine > freebsd# cat CVS-routine > cat: CVS-routine: Permission denied Umm, the idea is to get the file into the cache by first reading it legitimately as the owner of the file. The how-to-repeat still works for me. > in the original report, the originator reported, in his example, > that more gave an error while cat worked on the file: Yep, there seems to be some confusion here. I should have used 'cat' exclusively. > As root: > > # more ~fred/a > a: permission denied > > As fred: > > % cat a > hello > % > > As root: > > # cat ~fred/a > hello > > > I used the same "How-To-Repeat" that the originator used, except > on an existing file. Actually, to make it exact: > > > As scrappy: > > cd > > touch this-is-a-test-file > > ls -lt !$ > ls -lt this-is-a-test-file > -rw-r--r-- 1 scrappy wheel 0 Apr 11 18:05 this-is-a-test-file > > chmod 600 !$ > chmod 600 this-is-a-test-file > > > As root: > freebsd# ls -lt this* > -rw------- 1 scrappy wheel 0 Apr 11 18:05 this-is-a-test-file > freebsd# cat this-is-a-test-file > cat: this-is-a-test-file: Permission denied > freebsd# more this-is-a-test-file > freebsd# more this-is-a-test-file > read error (press RETURN) You missed out the vital step: As scrappy: $ cat this-is-a-test-file $ before trying to read it as root. The root read then succeeds. Cheers, Simon -- Simon Marlow simonm@dcs.gla.ac.uk Research Assistant http://www.dcs.gla.ac.uk/~simonm/ finger for PGP public key