In php, I need to read a file that has no read access (the file permissions are -rw-r-----
).
Changing the file's permissions isn't possible. The file sits on a local server.
Various methods I've tried in PHP don't work (file_get_contents, fopen, and curl) and maybe that's to be expected if that last read bit isn't set. Is that because the web server is being blocked access?
If that's the case then why is it that Firefox can read the file directly (using file://) as does curl from a shell? About to write an external python script that can read the file... what am I missing here?