[phpBB] Permission denied (cache)
[phpBB] Permission denied (cache)
1. Forums and old posts open just fine.
2. New posts generate an error when you open them. The browser says this:
Warning: fopen(/home/cpreston/public_html/phpBB2/cache/fancy-data/phpbb-topics-95705) [function.fopen]: failed to open stream: Permission denied in /home/cpreston/public_html/phpBB2/includes/magic_seo_url.php on line 1268
I've checked the following:
1. fancy-data is set to 777
2. The file it's trying to open is there, and it's permissions are 644
Help! My board is a very popular part of my site.
Re: [phpBB] Permission denied (cache)
The problem was that I had restored the board to a point in time BEFORE the hack happened. I also restored the fancy-data directory, but I didn't remove it first. The result was that there were some cache files that referenced posts that didn't exist. Then when someone created a new post that generated the same post ID, magic SEO opened the same file name, appended the data to the file, thus generated a single file with multiple post entries in it. All I had to do was delete any cache files that were generated since the point in time the restore was done from. Magic SEO recreates the cache files.
FWIW, I think this could also be addressed in the code. When making a cache file for a new post (when the post is made), there could be a check to see if the file already exists. If it does, the file should be removed then recreated.