The Linux Community Forum

Support => General Help & Advice => Topic started by: glitch on May 19, 2014, 04:10:26 pm

Title: syslog.conf question [SOLVED]
Post by: glitch on May 19, 2014, 04:10:26 pm
Hey guys!

it has been a long time since I have posted on here but the rest of the internet is not helping me with this current issue so I thought I'd try here.

I have a line in /etc/syslog.conf;

# log user info
user.notice
                                                                      /var/log/log_filename

I was just wondering if there is anywhere I can set the permissions of the log file when it is generated.  For the time being I have set the permissions manually but in case the file is ever removed I need the new log file to have certain perms.

Cheers in advance
Title: Re: syslog.conf question
Post by: Mark Greaves (PCNetSpec) on May 19, 2014, 05:50:51 pm
I know this doesn't directly answer your question, but it looks like the syslog is generated by an account called "notice"

wouldn't it be easier just to add yourself to the "notice" group ?
Title: Re: syslog.conf question
Post by: SeZo on May 19, 2014, 09:55:28 pm
Could you not direct the output to a sub folder of /var/log/sub/log_filename and change the permissions of that folder?
Title: Re: syslog.conf question
Post by: glitch on May 20, 2014, 11:41:01 am
Cheers for your help guys.

I will put the subfolder idea to the user.

I also found that you can use /etc/logrotate.d/ to specify conditions.
Title: Re: syslog.conf question
Post by: Mark Greaves (PCNetSpec) on May 20, 2014, 11:51:38 am
Nice .. I've learned something new :) .. I'd never looked at the files in logrotate.d before.
Title: Re: syslog.conf question
Post by: glitch on May 20, 2014, 11:55:52 am
Same here.  Although I'm having an error with the create line.  Syntax is fine, I'm just trying to get to the bottom of it.
Title: Re: syslog.conf question
Post by: glitch on May 20, 2014, 12:07:25 pm
Sorted!

Incorrect information was the issue.  When writing the file in /etc/logrotate.d/ make sure the closing bracket '}' is on a new line.

Cheers for your help guys.
SimplePortal 2.3.3 © 2008-2010, SimplePortal