After upgrading from 6.8 to 6.9, running cron yields this error:

* warning: unlink(/tmp/logo.png) [function.unlink]: Operation not permitted in /home/USER/SITENAME/includes/file.inc on line 435.

The logs say: Could not delete temporary file "/tmp/logo.png" during garbage collection

Any ideas as to what might be causing this or how it can be resolved?

Thanks

Comments

iantresman’s picture

I'm also getting this, along with an associated log file entry:

Type       file system
Date       Friday, March 6, 2009 - 10:00
User       Anonymous
Location   http://cron.php?cron.php .
Referrer
Message   Could not delete temporary file "/tmp/favicon.ico" during garbage collection
Severity  emergency

I'm pretty sure there is no favicon.ico in my /tmp folder, and the /tmp folder has its permissions set to 777

Cody G’s picture

any more words on how to fix this?
Drupal 6.16
cron (setup in cpanel) seems to be working fine, but is throwing all kinds of errors to the log.

cron 05/19/2010 - 08:50 Cron run completed. Anonymous
file system 05/19/2010 - 08:50 Could not delete temporary file ... Anonymous
php 05/19/2010 - 08:50 unlink(/tmp/cozyhost2.png) Anonymous
file system 05/19/2010 - 08:50 Could not delete temporary file ... Anonymous
php 05/19/2010 - 08:50 unlink(/tmp/favicon.ico) ... Anonymous
file system 05/19/2010 - 08:50 Could not delete temporary file ... Anonymous
php 05/19/2010 - 08:50 unlink(/tmp/headersm_1.png) ... Anonymous
file system 05/19/2010 - 08:50 Could not delete temporary file ... Anonymous
php 05/19/2010 - 08:50 unlink(/tmp/headersm_0.jpg) ... Anonymous
file system 05/19/2010 - 08:50 Could not delete temporary file ... Anonymous
php 05/19/2010 - 08:50 unlink(/tmp/headersm_0.png) ... Anonymous
file system 05/19/2010 - 08:50 Could not delete temporary file ... Anonymous
php 05/19/2010 - 08:50 unlink(/tmp/headersm.png) ... Anonymous
file system 05/19/2010 - 08:50 Could not delete temporary file ... Anonymous
php 05/19/2010 - 08:50 unlink(/tmp/headersm.jpg) ... Anonymous
file system 05/19/2010 - 08:50 Could not delete temporary file ... Anonymous
php 05/19/2010 - 08:50 unlink(/tmp/header2.jpg) ... Anonymous

MrGeek’s picture

Jolly.Wimp’s picture

This link doesn't work. What should I do to fix this problem?

deepak.cms’s picture

I found the solution of this problem.

How to fix the Drupal “Could not delete temporary file during garbage collection” error:

Step 1: Make note of one of the file names specified in the error message. In your Drupal database, in the FILES table, find and delete the row that contains this particular filename. (note: it’s probably a good idea to make sure you have a backup of your Drupal database before messing with it)

Step 2: While logged-in to your site with User-1/Admin rights, manually run CRON.PHP

That’s it! Wait until your next automatic CRON.PHP run and (hopefully) all the errors will be gone – not just the error corresponding to the one file you deleted from your Drupal FILES table.

drebroff’s picture

at drupal7 table name is 'file_managed'. your post helped me.

bamban’s picture

I have same issue it pop up when I run cron.php MrGeek's solution dosen't work for me any idea ?

drupalfever’s picture

Once I moved my website from the development environment to my production server, I got a bunch of errors every time I ran cron.php.

I fixed it by disabling the devel module and all the other members of the development group. After that, I cleared cache.

That fixed it for me.