Yes, I already understood how permissions and umasks work. Here is a more detailed explanation of my question. Suppose that instead of having one group per user, the only group that all users belong to is `users'. To keep other users from being able to write to their files, everyone keeps their files as 644 and their umask as 022. Now suppose a few users are working on a project together and all need write access to certain files. The natural solution is to make a group `project' with these users as the only members, have the project files owned by group `project', with permissions 664. The trouble now is that because everyone has umask 022, whenever they create a new project file, they have to explicitly chmod it to 664. This is a pain, and worse than a pain when files are being automatically generated by scripts and makefiles. I've experienced it. However, if everyone belongs to their own group, then they can safely have umask 002 and no one else will be able to write their personal files. Now, however, when working with the project files, the permissions will be correct (664) by default. (I assume the project directory has the sticky-bit set, so all the project files are owned by the project group.) Since Debian is configured by default for one group per user, in which case a umask of 002 is safe, and a umask of 022 defeats the purpose, why does the default /etc/skel/.bash_profile in Debian set umask 022? Hope this explains my question a little better. \\// | R | T R | L B | //\\ ~ Michael Abraham Shulman mailto:shulman@caltech.edu ~ jabber://mas@jabber.org http://kurukshetra.cjb.net/ ~ GnuPG Public Key #21A279E5 Nothing will ever be attempted if all possible objections must first be overcome. -- Dr. Samuel Johnson
Attachment:
pgpxrQTEHOLfs.pgp
Description: PGP signature