Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a cisco firewall that's currently syslogging to /var/log/firewall . /var's getting tight on space, so I created /opt/log, gave it the same perms and ownership, then altered my /etc/syslog.conf file to write to /opt/log/firewall, and restarted syslog. No new files were being written to /opt/log and nothing was being written to /var/log either. So, I changed everything back and it's logging to /var/log again.
My question is, besides syslog.conf, is there anything that would keep me from syslogging to somewhere other than /var/log?
without wishing to dodge the question and reinvent the wheel, if you want nothign more than standard syslogging for the system and remote switches, i'd really really recommend changing to use syslog-ng instead, it's really simple to drop in replace syslogd and the configuration iso so simple when you're adding network syslog sources and such, and can do nice things like automatically archiving files into /host/yy/mm/dd/ things...
My question is, besides syslog.conf, is there anything that would keep me from syslogging to somewhere other than /var/log?
Some thoughts:
If the firewall program does its logging through syslog, then the answer is no. (By the way, you can verify that logging is going through syslog by running lsof and seeing which process is writing to /var/log/firewall). Assuming, as seems to be the case, that syslog is doing the logging, you might need to create the initial log file /opt/log/firewall, so you may need to touch it and subsequently chown and chmod it to whatever it should be (i.e. to whatever the permissions currently are on /var/log/firewall).
I just tried touching the files (firewall and firewall.1) and gave them the same perms as the files in /var/log. No dice. I ran an lsof and grepped for syslog, and while it was set to log to /opt/log, there was no entry for syslog in the output.
So, I took a look at the messages log, and here's what I found:
By the looks of it, selinux was preventing the syslogd daemon from writing to the file. I tried changing the enforcement level to permissive, and disabled, with no luck, but as far as I can tell the system needs to be rebooted to reset selinux. It's a production box, so I don't know when that will be. I'll be sure to update this post when I find out.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.