Archaic wrote: > On Tue, Dec 20, 2005 at 07:43:05PM -0600, Bruce Dubbs wrote: > >>Setting the umask value is important for security. Here the default >>group write permissions are turned off for system users and when the >>user name and group name *are not* the same. > > > I think the code should be left as is and the text changed. Something > like: > > Setting the umask value is important for security. In the following > example, the umask is 022 for all system users as well as any non-system > user whose username is not the same as the groupname. If the username > and groupname are the same, then setting the umask to 002 will allow for > group writability.
This is good. > Now, for my line of thinking, and I have brought this up before, I don't > think this is a good idea. First, having write access via the groupname > archaic is kinda silly when my username is archaic and hence gives me > the write access I need. Bruce mentioned shared groups when I last > brought up this topic, but so what? That has no bearing on the code or > the paragraph explaining it. It would require 2 users and 3 groups. Each > user having a group = to username and a third group that they are both > members of. Then it also requires (IIRC) a setgid shared directory for > the 002 to have any effect. IMO, unless all that is in the book, then > none of it should be and the default and sane 022 should be used. The whole purpose of setting the umask is to support shared directories. You are right about what is needed, but if uid and gid are the same for a normal user, there is no security problem unless the user changes groups manually with newgrp or sg. I know you are paranoid, but this construct doesn't hurt anything. It is also used in commercial distos. A quick check and I see RedHat uses it. Using it sets us up for shared directories, but doesn't implement them. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
