timthumb permissions

January 17, 2014 4.1k views
My droplet is running Ubuntu with Virtualmin installed and has 2 virtual servers. There is the main server, then a sub-server. My sub-server is where I am testing and running into problems. I am using the following wordpress plugin: which uses timthumb to generate the thumbnails. Inside the justified image grid plugin folder are the plugin files and timthumb.php and it's cache folder that has an index.html file and timthumb_cacheLastCleanTime.touch I have tried just about every combination of chmod and chown on the timthumb related files and folder. Here is the error I get in the log: [Fri Jan 17 04:51:57 2014] [error] [client] PHP Warning: touch(): Utime failed: Permission denied in /home/artimeg/domains/ on line 206, referer: is a post for testing. In the log file I get the following: GET…om/wp-content/uploads/Avenged-Sevenfold_760_20131011.jpg&h=280&q=90&f=.jpg 400 (Bad Request) The image file does exist as you can see: I am at a loss for ideas, so any help is much appreciated!
5 Answers

sudo chown www-data -R /var/www/timthumb-folder

you may want to make sure that the folder is chown to www-data (or whatever the apache user is)

very simple, back up your cache folder and download it to your machine. Then delete the cache folder and create a new one with the same name and give it 777 permission. try it out and see if things work fine or not.
I've tried setting the folder and files to 777 and tried users: root and www-data

I deleted the folder, re-created it and still no luck.

I also restarted apache after making the changes.
Got it working!

I think it was a combination of permissions and GD Library.

Once the permissions were ok, the site gave me an error stating that the GD Library was not installed. Once I got that installed, everything is working!

Thank you for the help!
Have another answer? Share your knowledge.