git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [4/5] Add option for hardlinkable cache of extracted blobs

From
PJPaul 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
Previous: Petr BaudisNext: Petr Baudis
Message 4 of 10 in “Re: [4/5] Add option for hardlinkable cache of extracted blobs”
  1. Petr BaudisApr 17, 2005
  2. Daniel BarkalowApr 17, 2005
  3. Petr BaudisApr 17, 2005
  4. Paul JacksonApr 18, 2005
  5. Petr BaudisApr 18, 2005
  6. Paul JacksonApr 18, 2005
  7. Russell KingApr 17, 2005
  8. First ever real kernel git merge!Linus Torvalds, Apr 17, 2005
  9. Paul JacksonApr 18, 2005
  10. Paul JacksonApr 18, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.