What numbers would you put in for a file that you want to be able to write and execute but NOT read?
permissions
Here is a handy online tool: http://www.classical-webdesigns.co.uk/resources/whatchmod.html
i think it'd be 0333. [if you want write/exec but not read for all users]
or 0733. [write/exec/read only for root, write/exec but not read for world and group members].
or 0733. [write/exec/read only for root, write/exec but not read for world and group members].
thanks! that was an extremely useful resource. is there anyway to make it to where you can't read a page by going there, but I can still read it by using fread()? I want that to be the only way that it can be read...
| Afaceinthematrix wrote: |
| thanks! that was an extremely useful resource. is there anyway to make it to where you can't read a page by going there, but I can still read it by using fread()? I want that to be the only way that it can be read... |
If you put the file outside the documenttree (/public_html/) and give it read access for everybody it can't be read using a browser, but it can still be read by fread(). You can also use .htaccess to prevent users from viewing a file and still having fread() alowed to read it.
For example, if you put this in your .htaccess:
| Code: |
|
<Files "secret.txt"> Order allow,deny Deny from all </Files> |
the file secret.txt can't be viewed by users browsing your site, but it can still be read using fread() and other PHP functions.
