home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / mod.std.unix.v5 / text0029.txt < prev    next >
Encoding:
Text File  |  1987-06-30  |  1.7 KB  |  39 lines

  1. >From: jsq@sally.utexas.edu (John Quarterman)
  2. Date: Mon, 3 Feb 1986 12:00:13 CST
  3.  
  4. > As a big fan of least common denominator, rather than feeping creaturism,
  5. > I would note that it is quite easy to get umask/dir, by simply using
  6. > the facilities provided by your shell.  For instance, using csh,
  7. > alias cd to do 'source .exitdir; cd \!* ; source .enterdir' , and
  8. > use the shell scripts called .enterdir and .exitdir to do directory
  9. > specific initializations.
  10. >             ***dan
  11.  
  12. To set up a source tree so that everybody used the same umask on it
  13. with your method would require everybody to change their .cshrc.
  14. To do it with real umask per directory would require only setting
  15. the umask for the directory.  The latter looks more like the least
  16. common denominator to me.
  17.  
  18. The more interesting question is *how* do you set a umask on a
  19. directory?  Do you try to derive the bits from the directory mode
  20. bits in some way, such as setgid means apply the group mode bits
  21. as the mask?  Or do you have to have an extra word in the inode?
  22. Or do you do it by a file in the directory?  And how do you get
  23. the umask inherited by child directories?
  24.  
  25. I would think the preferred approach would be to somehow derive
  26. the umask from the directory mode bits.  Inheriting could be done
  27. by just setting the umask for all the subdirectories with find.
  28. Except that mkdir should likely make sure the umask were inherited.
  29.  
  30. One wonders if most of the people for umask per directory are using
  31. 4.2BSD or 4.3BSD and those against are using other systems.
  32. The desirability becomes obvious after you get used to the 4.2BSD
  33. method of assigning the group of a new file according to the group
  34. of its parent directory.
  35.  
  36. Volume-Number: Volume 5, Number 30
  37.  
  38.