[CentOS] Random files in homedir gets deleted

Thu Jan 3 13:59:27 UTC 2008
mike.redan at bell.ca <mike.redan at bell.ca>

> 
> On one of my systems I seem to loose a file or two from time 
> to time. Last night, one of my files 
> (/home/online/sh/NattjobbPrivat.sh) was 
> deleted/removed/vanished. Another time it was 
> /home/online/sh/daemon that was deleted.
> 
> But I can't seem to find anything strange in the logs or in 
> the history, nor would any of my scripts running in crontab 
> mess with those files.
> 
> Where can I look for clues? And how do I enable audit for 
> file operations in my home folder?
> 


If your system is capable, use the SMART tools to check your drive out
(as CM suggests), something like this:

  smartctl -a /dev/sda
		<replace /dev/sda with the drive in question>
See how your 'error count log' is doing. If there are errors, then you
might want to run that command a few times and see if the error count is
still rising.


Is it everything in the /home/online/sh/ directory that is getting
deleted, or can you see any pattern at all? (it sounds like it is random
from what you said...but hard to think of why files would be deleted
randomly....as you know!)