syslog-ng-users April 2011 archive
Main Archive Page > Month Archives  > syslog-ng-users archives
syslog-ng-users: [syslog-ng] Info about owner() options

[syslog-ng] Info about owner() options

From: Cosmin Neagu <cosmin.neagu_at_nospam>
Date: Fri Apr 22 2011 - 08:19:49 GMT
To: syslog-ng@lists.balabit.hu

Hello,
New around here, i'm trying to use the owner option when logging into file.
My configs:

source s_udp { udp();};
destination df_hosts {
    
file("/home/cosmin/SYSLOG/HOSTS/$HOST/$YEAR/$MONTH/$DAY/$FACILITY$YEAR$MONTH$DAY"
owner(cosmin) group(cosmin) perm(0600) dir_perm(0700) create_dirs(yes));
   };
log {
         source(s_udp);
         destination(df_hosts);
};

The only problem is that files, are owned by root, not by cosmin.
cosmin@DellCosmin:~/SYSLOG$ sudo ls -l HOSTS/
total 8
drwx------ 3 root root 4096 2011-04-22 10:41 10.90.0.252
drwx------ 3 root root 4096 2011-04-22 10:41 192.168.156.100

So, can someone tell me if i'm doing something wrong? I would like the
files to be created and owned by cosmin:cosmin not root:root

The process is running as root:
cosmin@DellCosmin:~/SYSLOG$ ps -ef | grep syslog-ng
root 3448 1 0 10:41 ? 00:00:00 /usr/sbin/syslog-ng -p
/var/run/syslog-ng.pid

-- Cosmin Neagu NOC Team Leader Str. I. G. Duca nr. 36 Otopeni, Judetul Ilfov, 075100 Romania Tel: 021 303 3159 / 0732 669 193 www.omnilogic.ro ______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html