[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: umask questions

From: Igor Homyakov
Subject: Re: umask questions
Date: Wed, 7 Aug 2002 12:52:40 +0400
User-agent: Mutt/1.4i

On Tue, Aug 06, 2002 at 03:31:34PM -0700, Mark Ferlatte wrote:
> On Tue, Aug 06, 2002 at 02:38:46PM -0700, address@hidden wrote (0.50):
> > > 1) monit saves the umask it was started with and set this umask when a
> > >   new program is started. This implies that the umask monit inherited
> > >   will be passed on to start/stop programs executed by monit.
> > >
> > > 2) monit unsets the umask before it start a program and leaves it to
> > >   the program to set its own umask. (This usually means the mask 0666
> > >   unless explicit permissions is set by the program). Alternatively
> > >   monit could set a presumed sane mask (0022) instead of un-setting
> > >   the mask.
> > 
> > How about 2, but alternatively having a config file option to set a umask
> > other than the default (perhaps 0022)?

> If you are going to add a configuration option, then a per service
> monitored umask override may be appropriate... however, I don't believe
> that it is necessary.

> The system default umask is set at boot time (in Debian, it's set in
> /etc/init.d/rcS).  If a system admin desires a different default, they
> can set it there.  If a system admin desires a different umask for a
> specific service, they can edit that service's startup/shutdown script
> and change it (on SysV based systems, anyway... BSD is a little harder).

> If monit doesn't honor the default umask when it restarts a service,
> monit is making the environment of the restarted service different from
> the environment of the boot time service in a noticible way.  If it does
> honor the default system umask (by saving it at startup and restoring it
> just before spawn), then the restarted service is in the same
> environment as the boot time service, which is what would be expected.

> If you want a restarted service to have a different umask from the
> default, then you can edit the init script for that service (which you
> would have to do anyway).

> My $.02US.
Mark is right 

I'm not developer, but my vote for seconf variant. (+0.0 RUB)

Igor Homyakov
<homyakov AT>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]