🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Dave Sherman Thu, 05 Jul 1984 18:02
UNIX error message set wrong on open "file1/file2"
#228
Author: Dave Sherman
Date: Thu, 05 Jul 1984 18:02
24 lines
1373 bytes
Running 4.1, I tried to do
	tail foo/bar
and got
	foo/bar: Permission denied
which surprised me, since I was in my own directory. Turns out
that "foo" exists, but is a file, not a directory. The error
value really should be ENOENT ("No such file or directory") rather
than EACCES ("Permission denied").

This doesn't show up running tail(1) on v7, since v7 tail doesn't
call perror, but a test of perror revealed the same treatment.

Any reason why open("file/file") should return EACCES? The v7
manual page for intro(2) says EACCES means "An attempt was made
to access a file in a way forbidden *by the protection system*"
(emphasis mine).


Dave Sherman
Toronto
-- 
 {allegra,cornell,decvax,ihnp4,linus,utzoo}!utcsrgv!dave
or
 David_Sherman%Wayne-MTS%UMich-MTS.Mailnet@MIT-Multics.ARPA
Re: UNIX error message set wrong on open "file1/file2"
#229
Author: ShanklandJA
Date: Fri, 06 Jul 1984 22:00
13 lines
1208 bytes
    > Any reason why open("file/file") should return EACCES [rather
    > than ENOENT if the first file exists, but is not a directory]?

Yeah (or at least, sort of).  If the first file didn't have execute
permission set, it wouldn't be "searchable" as a directory.  Granted,
it would probably be clearer if the kernel checked whether 'file1'
was a directory BEFORE checking the permission bits to see if it could
be searched, rather than after; but I'll be willing to bet that's exactly
what's happening.

Jim Shankland
..!ihnp4!druxy!opus
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads