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

setting umask globally

If one is faced with the task to set the umask globally for all
users and shells, this turns out to be a job of redundancy: every
shell uses its own file in /etc, and you end up making changes to
5 files or more (depending on the number of installed shells).
What's worse: change the umask and you'll possibly forget one shell
or the other, which may cause delays in your user's work, or even
break things (yeah, you should not rely on umask; yeah, don't tell

I thus propose to solve this dilemma across all shells in Debian
with /etc/umask.conf (or /etc/default/umask), which can be the most
simple of simple configuration files, should probably ship in
base-files, and look like this:


In addition, there is /usr/share/base-files/umask.sh:


  test -r /etc/umask.conf && . /etc/umask.conf

  if [ $(id -u) -eq 0 ]; then
    umask $UMASK_ROOT
    umask $UMASK_USER

The /etc/profile-equivalent of every shell Debian ships then sources
/usr/share/base-files/umask.sh and the user can change the umask in
one single location.

So the plan is:

  1. gather comments.
  2. file a bug against base-files to have the files included.
  3. once base-files hits unstable, mass-file bugs against all
     compatible shells and ask them to use it.
  4. rejoice.
So, let's start at (1)...

 .''`.     martin f. krafft <madduck@debian.org>
: :'  :    proud Debian developer, admin, user, and author
`. `'`
  `-  Debian - when you have better things to do than fixing a system
Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver!
"with sufficient thrust, pigs fly just fine. however, this is not
 necessarily a good idea. it is hard to be sure where they are going
 to land, and it could be dangerous sitting under them as they fly
                                                           -- rfc 1925

Attachment: signature.asc
Description: Digital signature

Reply to: