0

Twice recently I've noticed that my vim settings have changed to defaults. Investigation shows that all files have been deleted from my /root/ directory. (Yes I currently log in as root, that's a different conversation...)

Can anyone suggest why this would be happening? The first time I assumed I'd accidentally repeated a recent command from my bash history as I had done an rm -f in a different folder shortly before hand, but on this occasion I've not rm'd anything for days and after a yum update (which included a new kernel) and a reboot the files have gone again...?

Folders don't get deleted from /root/, just files.

Any ideas?

Many thanks.

Codemonkey
  • 1,034
  • 2
  • 17
  • 36
  • Check out https://serverfault.com/questions/144698/file-audit-in-linux-how-to-watch-directory-tree-for-deletions – Brandon Xavier Oct 15 '17 at 14:00
  • I've figured mine out. I have a cron bash script that runs every minute. It cd's to a cache directory of my website, and deletes any files older then 5 minutes. Sometimes after a reboot that directory doesn't exist, in which case it deletes any files older than 5 minutes in my home directory. Adding a check that the directory exists is all that was needed! – Codemonkey Oct 31 '17 at 09:53

0 Answers0