This module allows you to "lock" files so they cannot be deleted.

File Lock can be used to control two different problems:

Preventing deliberate deletion of files
Preventing accidental deletion of files caused by the behaviour of Drupal's core file field
File Lock is particularly useful when used with a media library setup, for example using the Media module.