tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Permissions of the root dot files



On Tue, Aug 30, 2022 at 08:38:02 +0700, Robert Elz wrote:

>     Date:        Tue, 30 Aug 2022 02:27:33 +0300
>     From:        Valery Ushakov <uwe%stderr.spb.ru@localhost>
>     Message-ID:  <Yw1LZafmJKAvhaaj%pony.stderr.spb.ru@localhost>
> 
>   | Is there any particular reason why /root/.profile and /root/.cshrc
>   | (that have hard links in / too, for the single user mode i guess) are
>   | not writable?
> 
> Aside from applications like vi rm mv etc (probably more) which require
> a slight bit more effort if the file has no write permission, what
> difference does the user 'w' (or 'r' ... 'x' does matter) permission
> bit really make on a root owned file?

Exactly my point.  So why do we inflict that on people (ourselves
included)?  .shrc is writable but .profile is not and (vice versa) for
csh - .login is writable and .cshrc is not.

Dot files are meant to be edited, so "aside from vi" is, IMO, a
mischaracterization of a situation.  And "a slight bit more"
accumulates over different test VMs etc.

-uwe


Home | Main Index | Thread Index | Old Index