Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84; site opus.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!sdcsvax!sdcrdcf!hplabs!hao!cires!nbires!opus!rcd From: rcd@opus.UUCP (Dick Dunn) Newsgroups: net.unix-wizards Subject: Re: access system call broken? Message-ID: <959@opus.UUCP> Date: Wed, 28-Nov-84 02:41:15 EST Article-I.D.: opus.959 Posted: Wed Nov 28 02:41:15 1984 Date-Received: Fri, 30-Nov-84 07:35:31 EST References: <1165@bbncca.ARPA> Organization: NBI,Inc, Boulder CO Lines: 20 > In v7 and 4.2, with the possible exception of > write access, the access system call always returns > success for the super user. this seems wrong > to me. whether one is super user or not, if execute bits > are not set, that's all she wrote. any wisdom as to why > a call to check execute permission (i.e access(filename, 01)) > should return 0 for a plain file with no execute permissions? This is even curiouser if you peruse the documentation. Access(2) claims that "...it is only access bits that are checked." However, a file even with mode 0 is regarded as executable by access. Exec doesn't think it's executable (as the author of the parent article indicated) and the documentation says as much: "Even for the super-user, at least one of the execute-permission bits must be set for a file to be executed." That's a good thing in a way; it can keep you from doing a few stupid things if you're wandering around as root with "." in your path (which is a bad idea for other reasons, however). -- Dick Dunn {hao,ucbvax,allegra}!nbires!rcd (303)444-5710 x3086 ...Reality? Gad, that's worse than puberty!