From: Petr Baudis Date: Mon, 18 Apr 2005 01:48:58 GMT Subject: Re: [4/5] Add option for hardlinkable cache of extracted blobs Message-ID: <20050418014858.GI1461@pasky.ji.cz> In-Reply-To: <20050417183508.15beb1fd.pj@sgi.com> Dear diary, on Mon, Apr 18, 2005 at 03:35:08AM CEST, I got a letter where Paul Jackson told me that... > Petr wrote: > > The documentation I've got says: > > > > "R_OK, W_OK and X_OK request checking whether the file exists and has > > read, write and execute permissions, respectively. F_OK just requests > > checking for the existence of the file." > > You don't exactly say it, but I'm guessing that you think that this > documentation is stating that F_OK checks for the existance of the file > _regardless_ of path access permissions. > > No so. Write your own little test program, and/or read the kernel source. > > Even if the file exists, if its directory entry is not accessible to the > _real_ uid/gid, access F_OK will fail. If the problem is a lack of > seach permissions on some directory in the path, the errno will be > EACCES. Ok, I stand corrected; and when giving the access(2) manual page a second look, it could imply that too. It has some room for more crystal-clearness, though. ;-) Thanks, -- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor