Re: [4/5] Add option for hardlinkable cache of extracted blobs
- From
- Paul Jackson <pj@sgi.com>
- Date
- Apr 18, 2005, 01:35 UTC
- Message-ID
- <20050417183508.15beb1fd.pj@sgi.com>
- In-Reply-To
- <20050417201856.GJ1461@pasky.ji.cz>
Petr wrote:
Show 5 quoted lines
> 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.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@engr.sgi.com> 1.650.933.1373, 1.925.600.0401