[syslog-ng] owner and group of create dirs

Balazs Scheidler bazsi@balabit.hu
Thu, 1 Jun 2000 11:02:56 +0200


On Thu, Jun 01, 2000 at 03:58:37PM +0900, Tomohiro Yamauchi wrote:
> Hi, My syslog-ng.conf is 
> 
> destination  std  { file("/var/log/$HOST/$FACILITY.debug/$YEAR$MONTH/$FACILITY.debug$YEAR$MONTH$DAY" owner(admin) group(admin) perm(0600) dir_perm(0700) create_dirs(yes)); };
> 
> If /var/log/$HOST/$FACILITY.debug/$YEAR$MONTH is not exist,
> make that dirs. But that's owner is root:other. I think because
> daemon's effective user ID is root.
> 
> I want to change dir's owner. Is this possible?

yes, you can do this using the owner(), group() and perm() options. you can
even have syslog-ng to create the directories for you using the

create_dirs(yes) option.

for example:

destination d_file { file("/var/log/$HOST/log" create_dirs(yes) owner(log) group(log) perm(0600)); };

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