Should root ever own files in my (linux) home directory?
- by Darren Cook
This question started off asking why my history file wasn't working properly. Then I noticed it was -rw------- 1 root root and hadn't been updated since 2012-09-11. I changed the ownership, problem fixed.
But now I see some other files are owned by root:
.gitconfig
.pearrc
.viminfo
Can I safely change them to be owned by my normal user, not root? I'm scratching my head trying to work out if there is a downside, or a security consequence.
Losing seven weeks history is actually quite painful, because I lean on it a lot (e.g. to remind how I last did an archive). Would it be reasonable to set up a cron job to email me if it finds any files in my home directory owned by anyone else but me? Rephrased: is there ever a good reason for root to own a file in my home directory?