Menu

#25 Incorrectly setting umask on unix daemons

v3.0.3
closed-fixed
Misc (42)
5
2014-08-20
2003-08-14
Anonymous
No

In the wrapper_unix.c, there is a call to umask(0) in
the daemonize function. This results in all
files/directories being created by the daemon to be
world r/w and does not allow umask to propogate from
the launch scripts.

There should probably be a wrapper.conf property for
the desired umask. In the mean-time, I am submitting a
patch to remove this umask call so that the umask will
propogate from the invoking script.

This patch is applied against the 3.0.4 version.

Discussion

  • Nobody/Anonymous

    Patch

     
  • Leif Mortenson

    Leif Mortenson - 2003-08-15

    Logged In: YES
    user_id=228081

    Good catch. Your patch has been applied. This will be in
    the 3.0.5 release.

     
  • Leif Mortenson

    Leif Mortenson - 2003-08-15
    • assigned_to: nobody --> mortenson
    • status: open --> closed-fixed
     
  • Nate Gelbard

    Nate Gelbard - 2004-01-09

    Logged In: YES
    user_id=65524

    I am running 3.0.5 on Solaris. Looking the in 3.0.5 codebase,
    this umask(0) has been removed from daemonize().
    But, the wrapper still does not correctly propogate the
    umask setting from the script to the daemons and files are
    being created with world readable/writeable permissions.

     
  • Leif Mortenson

    Leif Mortenson - 2004-01-09
    • status: closed-fixed --> open-accepted
     
  • Leif Mortenson

    Leif Mortenson - 2004-01-09

    Logged In: YES
    user_id=228081

    Thanks. I reopened this and will take a closer look.
    Cheers,
    Leif

     
  • Nate Gelbard

    Nate Gelbard - 2004-01-09

    Logged In: YES
    user_id=65524

    Leif,

    As it turns out, we have wrapper 3.0.4 running in our
    system, but the 3.0.5 src checked in to source control. I
    was unable to get a version number from the wrapper binary
    and thought we had 3.0.5.

    I will retest this today. Sorry to bother you.
    Nate

     
  • Leif Mortenson

    Leif Mortenson - 2004-01-09

    Logged In: YES
    user_id=228081

    Nate,
    No problem. Let me know how your tests go so I can cose
    this back off.

    As for the version issue. I added some checks in the next
    release to check that the wrapper binary, JNI library and
    wrapper.jar are all the same version. As part of this, it
    will be easier to tell what version is currently being used.

    Cheers,
    Leif

     
  • Leif Mortenson

    Leif Mortenson - 2004-01-14
    • status: open-accepted --> closed-fixed
     
  • Leif Mortenson

    Leif Mortenson - 2004-01-14

    Logged In: YES
    user_id=228081

    Sounds like this wan't really broken still, so closing this
    back off.
    Leif

     

Log in to post a comment.

MongoDB Logo MongoDB