Warning:fopen(cache...

Asked by caprenter

I place a copy of the application on my server, point my browser to the index.php page and get an error message:

Warning: fopen(cache/cache_plingsToday.txt) [function.fopen]: failed to open stream: Permission denied in /home/david/Desktop/Working_Webs/webplings/airline_jetson/assets/singlepling.php on line 191

Warning: fwrite(): supplied argument is not a valid stream resource in /home/david/Desktop/Working_Webs/webplings/airline_jetson/assets/singlepling.php on line 192

Warning: fclose(): supplied argument is not a valid stream resource in /home/david/Desktop/Working_Webs/webplings/airline_jetson/assets/singlepling.php on line 193

Help.

Question information

Language:
English Edit question
Status:
Solved
For:
Web Plings Edit question
Assignee:
No assignee Edit question
Solved by:
caprenter
Solved:
Last query:
Last reply:
Revision history for this message
caprenter (david-carpenter) said :
#1

This is to do with the permissions settings on the files in the 'cache' directory.

You may also get this problem on other pages (e.g. lists, places to go, individual pling entries....)

You should set the permissions so that your application can write to that file.

An unsecure way of doing this is to grant 0666 permissions (read and write for everyone), but a better way for deployed applications needs to be found.

I think this would be to make the files owned by the webserver, and then to grant write permissions only to the webserver.

If anyone can help further, please do. The issue is also addressed in Magpie RSS.

Revision history for this message
caprenter (david-carpenter) said :
#2

I think a possible answer to this is about the ownership of the files in question.

These should be set to be owned by your webserver, and in your webserver's group.

On my installation of Xampp, the owner is 'nobody' and the group is 'nogroup'. Setting ownership to these settings and with read permissions to all, but write only to the owner works and makes your files more secure.

I guess really we should give them random names as well, as Magpie RSS to make it harder for people on the outside to find and potentially inject stuff into.

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
caprenter (david-carpenter) said :
#4

This a good bit of general info.

Revision history for this message
Chaos Inc. (potrokunjo) said :
#5

Is there a way for us to assign a specific script ssl bit encrypted connections directly without compromising any or opening function?

anyone?

Regards,

Ishtiaq
http://www.nokiasymbianthemes.com

Revision history for this message
caprenter (david-carpenter) said :
#6

This is to do with the permissions settings on the files in the 'cache' directory.

You may also get this problem on other pages (e.g. lists, places to go, individual pling entries....)

You should set the permissions so that your application can write to that file.

The issue is also addressed in Magpie RSS.
FAQ #597: “Warning:fopen(cache...”.