FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

permissions

 


Afaceinthematrix
What numbers would you put in for a file that you want to be able to write and execute but NOT read?
MrBlueSky
Here is a handy online tool: http://www.classical-webdesigns.co.uk/resources/whatchmod.html
rohan2kool
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].
Afaceinthematrix
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...
MrBlueSky
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.
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.