I'd like to make a file on my server be readable by PHP, but not directly accessible with a browser. Say my Apache installation's root is /apache. I'd like PHP to be able to get the text of
/apache/1.txt, but not allow the user to go to
domain.tld/1.txt and view the contents. I'd still like to be able to read/write the file through FTP/SFTP without root.
What would be the propper
chmod string for this? 642 seems likely, but I'm not sure how PHP accesses the file.