Need Help!cache directory is not writable

Started by KenX, June 08, 2012, 06:41:55 AM

Previous topic - Next topic

KenX

I am getting this error
Performance Warning
The cache directory is not writable - this will adversely affect the performance of your forum.


How can I solve this problem? ???
I am using SMF 2.0.2

Storman™

Sounds like the chmod settings on that folder (cache) are set incorrectly.

CHMOD - What's that all about ?

It's probably set to 755 or less. Try changing to 775 initially

MrPhil

PHP needs to be able to write to the directory. If 755 doesn't work, try adding "write" privileges to the permissions until they work. 775 might do it, and is fairly safe, but I would be leery of using 777 (anyone sharing your server can overwrite your cache). See my sig > FAQs > Proper Permissions.

You should experience the same "not writable" problems with your attachments and avatars directories, and packages (if you choose to install a mod). Frankly, the SMF cache system has never worked very well and is the source of many problems (requiring that the cache be emptied out). I would suggest simply disabling the SMF cache if you can't get it to work well and consistently with reasonable permissions. You won't really lose much.

KenX

Thanks changed it to 777 and it worked.But I know it's dangerous to keep it to 777.Why is it not writable with 755 or 775?

Storman™

QuoteThanks changed it to 777 and it worked.But I know it's dangerous to keep it to 777.Why is it not writable with 755 or 775?

Lots of info in this topic:

Why chmod 777 is NOT a security risk

It's a contentious and debatable issue, read the replies though as there are instances when it could be a potential risk.

If it worries you simply turn off the cache, it may well work ok without it.

MrPhil

Quote from: KenX on June 10, 2012, 06:11:43 AM
Thanks changed it to 777 and it worked.But I know it's dangerous to keep it to 777.Why is it not writable with 755 or 775?

If your server is set up such that PHP is running as a random user ID, its permissions will fall under "other" or "world". That's the third number in the permissions. I don't like hosts that set up that way, but that's life.

Contrary to what some will tell you, 777 is often a security hazard on a shared server. Even if no one can get in through the Web interface, other users sharing your server may be able to get to your directories. That's why you should avoid 777 unless there's absolutely no other choice, and even then, revert to 755 when the operation (such as a mod installation) is completed, if possible.

Advertisement: