Author Topic: syslog.conf question [SOLVED]  (Read 1197 times)

0 Members and 1 Guest are viewing this topic.

Offline glitch

  • digital jedi
  • Sr. Member
  • ****
  • Posts: 251
  • Karma: 12
  • Gender: Male
  • age of the geek!
    • View Profile
    • Awards
syslog.conf question [SOLVED]
« 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
« Last Edit: May 20, 2014, 12:07:43 pm by glitch »
//glitch

END OF LINE_

@g1i7ch

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18231
  • Karma: 476
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: syslog.conf question
« Reply #1 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 ?
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline SeZo

  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 142
  • Gender: Male
    • View Profile
    • Awards
Re: syslog.conf question
« Reply #2 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?

Offline glitch

  • digital jedi
  • Sr. Member
  • ****
  • Posts: 251
  • Karma: 12
  • Gender: Male
  • age of the geek!
    • View Profile
    • Awards
Re: syslog.conf question
« Reply #3 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.
//glitch

END OF LINE_

@g1i7ch

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18231
  • Karma: 476
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: syslog.conf question
« Reply #4 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.
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline glitch

  • digital jedi
  • Sr. Member
  • ****
  • Posts: 251
  • Karma: 12
  • Gender: Male
  • age of the geek!
    • View Profile
    • Awards
Re: syslog.conf question
« Reply #5 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.
//glitch

END OF LINE_

@g1i7ch

Offline glitch

  • digital jedi
  • Sr. Member
  • ****
  • Posts: 251
  • Karma: 12
  • Gender: Male
  • age of the geek!
    • View Profile
    • Awards
Re: syslog.conf question
« Reply #6 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.
//glitch

END OF LINE_

@g1i7ch

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal