I've searched for many-many ways to set global umask in Debian, but they didn't works as I need or didn't work at all.
I have a laptop which is used by couple of people. I can handle setting their home directories permissions to 700, but there is also one big storage for all files for everyone. I need them to only create files accessible for them. Tried using /etc/profile, /etc/login.defs and all other popular solutions. The problem is that I want to set it truly global: any program in system would obey, from bash and GNOME to SSH server. Messing with kernel or even kernel source will do, but I'd prefer simplest solution.