How's the best, secure way to have
/home/user/.bashrc include a common
In other words like this:
/root/.bashrc --sources--> .bash.shared <--sources-- /home/user/.bashrc
If I put
/root, then I can't read it from home due to lack of permission because on Debian /root is set to drwx------ by default.
I don't know the security consequences of loosening restrictions on /root. It must be that way for a reason. (In other words, I would have to give /root drwx-----x).
I think one possible workaround, would be to put
.bash.shared in some other root owned folder that both root and users can read, but I'm wondering if there is a simpler way to do this, or if loosening the permissions on /root is safe?
(Out of fear, and as I've been learning linux, I've kept two separate identical files:
/home/user/.bash.shared, thinking that at some point I would stumble on a good solution to this. It's a pain to remember to always update the other when I edit the one. So I want to fix this one way or another, but without a security hole.)