FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free 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.
Related topics
cPanel permissions problem.
Can't change permissions? Could not change perms on images
Permissions problem with Linux
Questions about cron jobs and permissions
Permissions problem
File permissions (Server 1)
joomla permissions
Permissions on my root html directory
File permissions?
public /stats won't work, and add again gets error!
y can buy special permissions ?
Help with my pcnuke site.
upload folder permissions
I can't change permissions!
chmod /tmp folder - permissions 777????
Reply to topic    Frihost Forum Index -> Scripting -> Others

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