Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!ukc!its63b!simon From: simon@its63b.ed.ac.uk (Simon Brown) Newsgroups: comp.unix.questions Subject: Re: access(2) question Message-ID: <489@its63b.ed.ac.uk> Date: Sun, 21-Jun-87 17:36:42 EDT Article-I.D.: its63b.489 Posted: Sun Jun 21 17:36:42 1987 Date-Received: Fri, 26-Jun-87 03:43:03 EDT References: <530@applix.UUCP> <488@its63b.ed.ac.uk> Reply-To: simon@its63b.ed.ac.uk (Simon Brown) Organization: Computer Science Department, Edinburgh University Lines: 27 Keywords: access permissions In article <488@its63b.ed.ac.uk> simon@its63b.ed.ac.uk (Simon Brown) writes: >In article <530@applix.UUCP> mark@applix.UUCP (Mark Fox) writes: >>Does anybody know why access checks file accessibility using the real [ug]id >>in place of the effective [ug]id? It seems to me that access should agree >>with open(2) as far as whether a program has write or read access to a file. > So, as a followup - try three guesses as to how the BSD4.2 test(1) program implements "test -r", "test -w", etc...? Yes, dead right, it uses access!!!! Great, eh? Even worse, it uses it even when trying to check write-access in a directory, which will ALWAYS fail 'cos you can't write in a directory directly. Of course, when you say "test -w directory" what you REALLY want to know is whether you can create/delete files there, but of course test(1) is *far* too stupid to realize this! Anyonw know if this is fixed in 4.3 (being too lazy to check for myself)? %{ Simon! %} -- ---------------------------------- | Simon Brown | UUCP: seismo!mcvax!ukc!its63b!simon | Department of Computer Science | JANET: simon@uk.ac.ed.its63b | University of Edinburgh, | ARPA: simon%its63b.ed.ac.uk@cs.ucl.ac.uk | Scotland, UK. | ---------------------------------- "Life's like that, you know"