Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 04-30-2012, 09:48 AM   #1
Registered: Apr 2003
Location: United States
Distribution: RHEL 5.4, Snow Leopard
Posts: 87

Rep: Reputation: 15
Changing file permissions of generated /var/log files

If I wanted to change the default permissions with which /var/log files like rpmpkgs or messages are generated, how would I go about it? Like if /var/log/messages files were being generated with 644, how could I make sure that any new messages files were generated with...640 for example?
Old 04-30-2012, 10:18 AM   #2
Registered: Apr 2012
Location: /root
Distribution: Ubuntu, Redhat, Fedora, CentOS
Posts: 190

Rep: Reputation: 55
you need to change the config into /etc/logrotate.conf and other log related file like messages, others resided into /etc/logrotate.d/
so you need to modify every log file config accordingly to your need.

Amit m.
Old 06-13-2012, 09:25 AM   #3
Senior Member
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 13.1
Posts: 1,328

Rep: Reputation: 254Reputation: 254Reputation: 254
At logrotate time itís already too late if I get the question in the correct way. There are options (at least in syslog-ng [setting perm(perm) in syslog-ng.conf], but I would assume in others like rsyslog too) to set the default permissions of the created files.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
setting file permissions for file /var/log/Xorg.0.log mfb Linux - Security 1 07-07-2009 01:41 PM
Can Samhain log my entries in /var/log/secure and /var/log/mesage to a central server abefroman Linux - Software 2 04-13-2008 04:13 PM
Changing file permissions within a directory for all files. cajunaggie Linux - Newbie 2 02-06-2005 01:53 AM
How is the file list in /var/log/packages/* generated? hollywoodb Slackware 4 09-19-2004 09:16 AM
iptables, changing log file from /var/log/messages acid2000 Linux - Networking 3 03-11-2003 08:38 PM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:55 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration