home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / mail / elm / 3242 < prev    next >
Encoding:
Text File  |  1992-11-09  |  4.5 KB  |  101 lines

  1. Newsgroups: comp.mail.elm
  2. Path: sparky!uunet!cs.utexas.edu!torn!watserv2.uwaterloo.ca!mach1!mach2.wlu.ca!derwin
  3. From: derwin@mach2.wlu.ca (Daryl Erwin)
  4. Subject: Re: ELM 2.4PL6 - Big problem! Changing permissions on /usr/mail (here's the code)
  5. References: <848@rc1.vub.ac.be> <1992Nov7.001144.15937@daffy.cs.wisc.edu> <1992Nov7.033752.12791@DSI.COM>
  6. Message-ID: <BxGBxF.9v0@mach1.wlu.ca>
  7. Nntp-Posting-Host: mach2.wlu.ca
  8. Sender: news@mach1.wlu.ca (news facility)
  9. Organization: Wilfrid Laurier University
  10. Date: Mon, 9 Nov 1992 13:53:39 GMT
  11. Lines: 88
  12.  
  13. In article <1992Nov7.033752.12791@DSI.COM> syd@DSI.COM writes:
  14. >quale@spock.cs.wisc.edu (Doug Quale) writes:
  15. >>In article <848@rc1.vub.ac.be> apardon@rc1.vub.ac.be (Antoon Pardon) writes:
  16. >>>In article <Bx9BHq.E1x@mach1.wlu.ca>, derwin@mach2.wlu.ca (Daryl Erwin) writes:
  17. >>>|> HELP! HELP!
  18. >>>|> 
  19. >>>|> I think there is a big problem with elm 2.4 (not necessarily just pl6).
  20. >>>|> 
  21. >>>|> Our directories in /usr/mail/ (users mail directories) group permissions
  22. >>>|> are being chamed from 'mail' to some other group (their own).
  23. >>>
  24. >>>We have had similar problems here. The problem however was not elm
  25. >>>but a buggy NFS. The problems was that when a file was opened with
  26. >>>the CREAT flag over NFS and you where the owner of the file the group of
  27. >>>the file was changed to the gid of the process even if the file already 
  28. >>>existed. As a workaround (This works only on bsd systems I think) we
  29. >>>set the setgid bit on the spooldirectory to indicate that created files
  30. >>>should get the gid of the spool instead that of the process. It works
  31. >>>for the moment.
  32. >>>
  33. >
  34. >>If this is indeed the problem, it is a bug in Elm.  BSD and SYSV systems
  35. >>set the gid of newly created files differently.  In BSD, the gid = gid
  36. >>of parent directory, in SYSV gid = gid of creating process, unless the
  37. >>the parent directory is sgid when the BSD behavior is used.  POSIX permits
  38. >>either behavior.  If the gid of a newly created directory is important
  39. >>(and it certainly is here!), the only reliable thing to do is explicitly
  40. >>chown it to the desired group after the open.
  41. >Ok, I've got a problem here, and I've kept my big trap shut until now.
  42. >
  43. >Perhaps its semanics, perhaps it isn't.  But, the original post
  44. >talked about Elm changing the permissions of directories in /usr/mail.
  45. >Elm doesn't deal with or touch directories in /usr/mail, only files.
  46. >So did the original user (Daryl Erwin) mean directories or files.
  47. >
  48. >The second person talked about files that already existed and NFS
  49. >changing the group of an existing file.  Now, actually, Elm probably
  50. >did its usual copy to temp and copy back, so especially with NFS, where
  51. >the cross link would fail, it would be a copy back and not a hard link,
  52. >the original group id should not be changed.
  53. >
  54. >But again, we go back to the master case, Elm copies the file over and
  55. >then links the new copy back into /usr/mail.  Elm does indeed do a
  56. >chown(file, user, group) back to the same user and group as the
  57. >original file.   (See leavembox for the code, its called
  58. >restore_file_stats.  So again, normally it should work (note that the
  59. >case where setgid directories is indeed needed, BSD, is the case where
  60. >only root can do the chown system call.)
  61. >
  62. >So, we are still down to the original problem, which no one has bothered
  63. >to track down..... Why is sometimes the group id being changed, and is Elm
  64. >doing it?
  65. >
  66. >Now, as my own systems two cents, We run SVR4 on our mailhost here,
  67. >and the mail spool is
  68. >
  69. >drwxrwxr-x   3 root     mail         512 Nov  6 22:34 /var/mail
  70. >
  71. >no, setgid there, and the mail files have never been changed from group
  72. >mail by Elm or by smail 3.1 (my MTA of choice).   So, this site hasn't
  73. >seen the problem.
  74. >
  75. >So, my two cents: Someone who is experiencing the problem, you'll
  76. >have to investigate further as to what it is.
  77. >
  78. leavembox.c ....
  79.  
  80.     /*
  81.      * restore permissions and access times of folder only if not
  82.      * a symlink, as symlinks have no permissions, and not worth
  83.      * tracking down what it points to.
  84.      */
  85.  
  86.     if (!is_symlink) {
  87.       if(restore_file_stats(cur_folder) != 1) {
  88.         error1(catgets(elm_msg_cat, ElmSet, ElmLeaveProblemsRestoringPerms,
  89.           "Problems restoring permissions of folder %s!"), cur_folder);
  90.         sleep(2);
  91.       }
  92.     }
  93.  
  94.  
  95. I get the error here when leaving elm with an empty mailbox.
  96. -- 
  97. Daryl Erwin                                     Net Address: derwin@mach2.WLU.CA
  98. Computing Services                              Surface Mail: P4-1, Main Campus 
  99. Wilfrid Laurier University, Waterloo, Ontario 
  100. Bus:(519) 884-1970 x2910                                          ... Go Hawks!
  101.