[syslog-ng]syslog-ng & Directory Creation

Balazs Scheidler syslog-ng@lists.balabit.hu
Thu, 20 May 2004 11:42:25 +0200


2004-05-20, cs keltezéssel 04:18-kor Philip Webster ezt írta:
> Hello,
> 
> I've just changed the owner for new files created by syslog-ng to be someone 
> other than root, but new directories are still owned by root.  The relevant 
> configuration is:
> 
> destination dst_hosts {
>          file("/path/to/logs/$HOST/$YEAR-$MONTH-$DAY"
>          template("$FULLDATE $FULLHOST $FACILITY.$PRIORITY $MSG\n")
>          owner(loguser) group(loguser) perm(0600) dir_perm(0700)
>          create_dirs(yes));
> 
> I've tried placing the create_dirs() directive before the owner() directive, 
> but with no change in the result.  The owner of the top-level directory 
> (/path/to/logs) is also loguser.  All files are created with the correct owner 
> and group.  syslog-ng version is 1.6.3.
> 
> Is there anything I am doing wrong?

you need the dir_owner/dir_group/dir_perm options

-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1