[syslog-ng]umask settings?

Balazs Scheidler bazsi@balabit.hu
Tue, 14 Nov 2000 11:17:45 +0100


> i noticed something odd when in installed syslog-ng
> heres my current setup
> >Linux flatbox 2.4.0-test9 #4 Thu Oct 12 14:03:39 EDT 2000 i686 unknown
> >syslog-ng 1.4.8 (also had problem with 1.4.7)
> 
> It seems that syslog-ng is ignoring perm(xxx) in favor of umask.
> heres the lines from syslog-ng.conf
> destination macrogenerateddaily {
>         file("/var/log/ng/$HOST/$YEAR$MONTH$DAY/$FACILITY.$PRIORITY" dir_perm(0755) perm(0644));
> };
> 
> destination macrogeneratedhourly {
>         file("/var/log/ng/$HOST/$YEAR$MONTH$DAY/$FACILITY.$PRIORITY.$HOUR" dir_perm(0755) perm(0644));
> };
> 
> 
> now..when i start syslog-ng with umask 077, i get files generated as 0600
> when i start with umask 022, i get files generated with as 0644.  i though
> that perm and dir_perm were set while ignoring umask, this should be
> noted in the documentation if it uses umask as well.

umask is enforced by the kernel. syslog-ng doesn't use it, it simply issues
chmod(file, perm), kernel masks bits found in umask.

-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
     url: http://www.balabit.hu/pgpkey.txt