Guys, I'm totally flumboxed. I am getting tons of the below errors and I have no idea what they mean or what to do... Well, apart from disable the flickr module.

# warning: unlink(/tmp/prices.82.1031.2030.eob7xavx.cache) [function.unlink]: Operation not permitted in  /sites/all/modules/flickrapi/phpFlickr/phpFlickr.php on line 139.
# warning: unlink(/tmp/prices.5.1031.2429.eob7xavx.cache) [function.unlink]: Operation not permitted in  /sites/all/modules/flickrapi/phpFlickr/phpFlickr.php on line 139.
# warning: unlink(/tmp/prices.80.1031.2030.eob7xavx.cache) [function.unlink]: Operation not permitted in  /sites/all/modules/flickrapi/phpFlickr/phpFlickr.php on line 139.
# warning: unlink(/tmp/prices.111.1031.2429.eob7xavx.cache) [function.unlink]: Operation not permitted in  /sites/all/modules/flickrapi/phpFlickr/phpFlickr.php on line 139.
# warning: unlink(/tmp/upsales.1031.2429.eob7xavx.cache) [function.unlink]: Operation not permitted in  /sites/all/modules/flickrapi/phpFlickr/phpFlickr.php on line 139.

My setup and I believe it has something to do with it:
Hosting: Shared - Godaddy
Drupal: Openpublish profile 1.7.0 (latest)
API Keys - Both installed for correct domain
MLT - Openpiblish addon module to work with Flickr..

So, When the errors first started, I disabled MLT for flickr reason being the errors only showi up when viewing the node in the detail page (not frontpage) when MLT - Flickr should kick in.
But the errors still showed up until I disabled flickr API itself.

Line 139 in phpFlickr.php is:

 unlink($this->cache_dir . '/' . $file);

No idea what that is but i suspect it has something to do with the tmp directory?
Permissions maybe?
Well, I chmoded 777 on the tmp directory i created outside the webroot... and another inside the webroot just to make sure...
No difference.
Help guys.

Comments

stattler’s picture

Seems like your /tmp directory is not writeable by the webserver. make sure it has permission 777 and the webserver (apache or nginx) can write there.

kenyan’s picture

Checked and double checked as stated earlier. The permissions are correct and I can write to the folder. I used the same folder for credit card keys for ubercart.

kenyan’s picture

Status: Active » Fixed

Fixed..
Turns out I needed to correct permissions for the /tmp directory THEN clear all catches.
I first disabled the module before clearing cache then enabled..
Just cant tell yet if it is working correctly cause I have not seen any MLT flickr items yet. When I do manage to load some, I will then be able to see which tmp folder they actually go to.
I created a folder inside my webroot and another outside it...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

alfthecat’s picture

Status: Closed (fixed) » Active

Hi, I have the same issue. I can't seem to find the /tmp folder though. I created one in the Drupal root and one level up but the issue persists.

unlink(/tmp/5ee0bd68bf872ed5789d1675d67e7cee.cache) [function.unlink]: Operation not permitted in [..] /sites/all/modules/flickrapi/phpFlickr/phpFlickr.php on line 139.

Any insights?

eagle1’s picture

Hi, I'm an a professional hoster, and I've resolved this issue, after a customer request.

The trouble (on shared hosting) is that some other user (in someone else drupal installation on the same server) have created the same file, but with a different owner (if the webserver run with systems like suphp or fastcgi).

So, the /tmp is fully writeable, but you CANNOT delete a file owned by another user. On shared hosting, this is a big trouble.

The REAL solution, is to fix the code to create more random filename for the cache's file.

alfthecat’s picture

Hi Eagle1,

Thanks a bunch for this information, as it now appears this issue was a tough nut to crack! I'm moving to vps anyway for this particular website so I guess relief is near :) and I hope your solution can be implemented in future versions.

thunderdunk’s picture

How does one "fix the code" as mentioned in #6? I am having the same problem, but don't know how to do this... Do I need to specify my own filename somewhere?

ouedraogo’s picture

my solution as been to change

Prise en charge de PHP ('safe_mode' = yes de PHP activé = no)

lolandese’s picture

Priority: Critical » Normal
Status: Active » Fixed

Seems to be solved or, at least, not dependent on the module's code but on the hosting environment. Please re-open if I'm not correct.

Setting priority to normal as it only effects users in rare cases.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

cog-axis’s picture

I fixed the issue by changing the permission to 777 recursively to all folders and also moved by tmp folder in drupal root directory.