Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!romp!auschs!awdprime!farpoint.austin.ibm.com!web From: web@farpoint.austin.ibm.com (Bill Baker) Newsgroups: comp.unix.aix Subject: Re: df . (was: Re: It works everywhere else, but not on AIX) Message-ID: <6793@awdprime.UUCP> Date: 18 Apr 91 14:53:55 GMT References: <1991Apr16.210447.28136@ibmpa.awdpa.ibm.com> <3783@d75.UUCP> <1991Apr17.220203.11528@batcomputer.tn.cornell.edu> Sender: news@awdprime.UUCP Organization: IBM AWD, Austin Lines: 25 >In article <3783@d75.UUCP> woan@cactus.org writes: >>In article <1991Apr16.210447.28136@ibmpa.awdpa.ibm.com> jsalter@slo.awdpa.ibm.com (Jim Salter) writes: >>>Sure enough, if the access mode for the directory doesn't have the user's >>>executable bit on, df . doesn't work. A defect has been opened. >>Are you positive that this is a defect? In the old days, df had to grope the super block to determine the free space in a file system. As a result, df had to be set-uid root, set-uid to the owner of the device files, or set-gid to the group id of the device files. Newer versions of Unix have a statfs (or statvfs) system call that returns interesting file system statistics given the name of any file in the file system. That makes "df ." trivial to implement. Df in AIX was coded to use statfs. However, it was mistakenly left set-uid bin. This means that df will fail in any directory that does not give search access to bin. This has already been fixed in AIX V3.1.5. web -- Bill Baker Internet: web@glasnost.austin.ibm.com IBM PSP AWD net: web@farpoint.austin.ibm.com 11400 Burnet Rd. VNET: WEBAKER AT AUSVMQ Austin, TX; 78758-2502