tech-userlevel archive

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

Re: Permissions of the root dot files



> Date: Tue, 30 Aug 2022 08:38:02 +0700
> From: Robert Elz <kre%munnari.OZ.AU@localhost>
> 
>     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?
> 
> I assume you aren't talking about group/other 'w' permission,
> which might be fine for you to grant on your own system, but
> certainly not to ship with NetBSD.

The default umask is 022.  The files are meant to be sourced, not
executed, so it makes sense to clear the x bits.  Other than that,
clearing any other bits needs justification.

These files are (privileged) user-editable configuration files from
the etc set which is always presumed to need local changes merged on
update.  In contrast, say, /bin/sh is from base and potentially
subject to automatic update without the presumption of need for
merging local changes.


Home | Main Index | Thread Index | Old Index