Marc Lehmann wrote:
> On Sat, Apr 04, 2009 at 03:02:56AM +0200, Michael Biebl <[email protected]> 
> wrote:
>>> The only thing I override is the $FileCreateMode.
>> So what did you change it to and what did not work correctly?
> 
> 0644, the created logfiles are all 0600 when the umask of the shell
> starting the init.d script is 077.
> 
>> As said, rsyslog does not apply a umask by default (so it can't be applied
>> errornously for that matter).
> 
> Well, I originally wrote that it does and again verified that it clearly
> does apply the umask. Changing the umask before starting it to 0 made it
> create logfgiles
> 
> Also, adding "$umask 0000" makes the problem go away, too, so rsyslogd
> clearly does apply the umask.
> 
>> The daemons you talk about, which provide a sane umask default, could you 
>> point
>> me to them specifically.
> 
>    grep umask /etc/init.d/*
> 
> you should have plently. it includes asterisk, bootlogd, crossfire, mysql,
> nscd, xprint, xrdp, and more, just on my desktop system.
> 
>> I checked both syslog-ng and sysklogd and neither of them messes around with 
>> umask.
> 
> syslogd dooes't allow permission specifications, so talking about it is
> moot. syslog-ng supports it, and does apply them correctly. rsyslogd does
> too, but filters them through umask.
> 
> Intererestingly, it seems at least gentoo and fedora core enforce a
> default umask in their initscripts for sysklogd, for this reason (they
> make it configurable, as syslogd itself uses a hardcoded 644 so the umask
> is the only configurable option).
> 
> Since there seems to be confusion about rsyslogd's actual behaviour, here is
> the rsyslogd.conf file that shows the issue:
> 
>    $ModLoad imuxsock
>    $ModLoad imklog
>    $ActionFileDefaultTemplate RSYSLOG_FileFormat
>    $FileOwner root
>    $FileGroup adm
>    $FileCreateMode 0644
>    $DirCreateMode 0755
>    $template local2,"%timegenerated:::date-rfc3339%%msg:::drop-last-lf%\n"
>    local2.* -/var/log/local2;local2
> 
> starting rsyslogd with umaks 0 makes it corretcly apply the specified
> permissions, without it, it filters through umask.
> 

So what concretely do you suggest:
Change the init script, change rsyslog.conf?
Which umask, why 0 and not e.g. 022?

Michael


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to