Should root ever own files in my (linux) home directory?
Posted
by
Darren Cook
on Super User
See other posts from Super User
or by Darren Cook
Published on 2012-10-30T03:11:08Z
Indexed on
2012/10/30
5:06 UTC
Read the original article
Hit count: 378
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?
© Super User or respective owner