Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!mcsun!hp4nl!star.cs.vu.nl!jms From: jms@cs.vu.nl (Jan-Mark) Newsgroups: comp.os.minix Subject: Re: search permission on directories Message-ID: <7282@star.cs.vu.nl> Date: 10 Aug 90 13:46:22 GMT References: <454@alice.marco.UUCP> Sender: news@cs.vu.nl Reply-To: jms@cs.vu.nl (Jan-Mark Wams) Organization: VU Dept. of Computer Science, Amsterdam, The Netherlands Lines: 25 In an article, leo@marco.UUCP (Matthias Pfaller) writes: > Yesterday I noticed, that even root does not have search permissions > on directories with mode d---------. Today I tried it on a real unix > box and here it is allowd. Bug or feature? This should be a bug. The origin isn't hard to gess. Since even root needs at least one x-bit to be able to execute a file. And the x-bit hapens to be the search permission-bit for directories. From fs/protect.c: # # /* If none of the X bits are on, not even the super-user can execute it. */ # xmask = (X_BIT << 6) | (X_BIT << 3) | X_BIT; /* all 3 X bits */ # if ( (access_desired & X_BIT) && (bits & xmask) == 0) r = EACCES; # It's obivouse some check on the d-bit is needed as wel. -- (:> jms (_) ========""======