I have had two occurrences over the last few days where the same file successfully uploaded to a node subsequently disappeared from the website, although the entry in the 'files' table still existed. At first I thought I had caused the problem myself by cleaning up duplicate copies of the file. However, I was able to confirm the second time that the file existed and was downloadable at 19:22 but had disappeared by 00:40 the next day.

I have seen similar issues reported against specific contributed modules where the status field in the 'files' table was '0' (temporary). I have no evidence that this is the case, although I do not have any database dumps between the file was uploaded and the problem was first reported. I see nothing in the Drupal or Apache logs that might explain why the file was deleted. The only difference I am aware of compared to other uploaded files was an exclamation mark and blank in the filename.

I have renamed and uploaded the file without any special characters and have not had a recurrence of the problem. I was not able to reproduce the problem with the original file on a test Drupal system. I am running Drupal 6.19 on CentOS 5.

Any guidance would be greatly appreciated!
thanks, Norbert

Comments

quicksketch’s picture

I don't have any ideas other than the ones you've listed here. The most likely one is the "status" column in the files table, since that's the only automated clean-up of files that would happen automatically within CCK, FileField, or Drupal core. If the files were set to permanent and deleted regardless, you should check other modules that implement hook_cron() and see if they do any file deletion of their own.

nhoeller’s picture

Status: Active » Closed (cannot reproduce)

The problem has not re-appeared, in spite of several attempts to recreate it. If it happens again, I will know what to look for.
thanks, Norbert