[syslog-ng]syslog-ng & Directory Creation

Philip Webster syslog-ng@lists.balabit.hu
Fri, 21 May 2004 10:17:53 +1000


Bazsi,

Balazs Scheidler wrote:
> 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

Works perfectly!  Thank you.

Phil