FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Problems with fopen()





ganjour
At attempt to open a file, I receive an error:
Code:
Warning: fopen (filtr.txt) [function.fopen]: failed to open stream: Permission denied in /home/ganjour/domains/cadrobot.frihost.org/public_html/index.php on line 23

filtr.txt permission set to 755
Service allows to use fopen? If yes, in what a problem?
ganjour
Excuse, I set permission to 777 and all became OK
cr3ativ3
ganjour wrote:
Excuse, I set permission to 777 and all became OK


You likely will not need full read write execute access for your file, nor is it a good practice to set anything to 777. The following permissions should work fine, for you to write to the file from your php script.

You'll need atleast read+write access by the user, so you can modify the file yourself, you'll want read and write by the group, and read and write by anybody (that way your php script can write to the file). You do not need any execute options, as it's simply a text file.

So your looking at

-rw-rw-rw

which is

666.

Chmod the text file 666 and see if it still works Wink

Good Luck.
Related topics
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Frihost Support

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