Hey, I seems to be having problem starting syslog-ng on one of my servers. when I start it, I get this error: * Caching service dependencies ... [ ok ] * Stopping syslog-ng ... * start-stop-daemon: fopen `/var/run/syslog-ng.pid': No such file or dir [ ok ] * Starting syslog-ng ... syslog-ng: Error creating pid file; file='/var/run/syslog-ng.pid', error='Permission denied' syslog-ng is started just fine, but the pid file is not written. Here is my emerge --info : Portage 2.2.0_alpha59 (default/linux/amd64/10.0/no-multilib, gcc-4.5.3, unavailable, 3.0.4-gentoo x86_64) ================================================================= System uname: Linux-3.0.4-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_860_@_2.80GHz-with-gentoo-2.0.3 Timestamp of tree: Thu, 22 Sep 2011 02:45:01 +0000 app-shells/bash: 4.2_p10 dev-lang/python: 2.7.2-r3, 3.2.2 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.0.3 sys-apps/openrc: 0.9.3-r1 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.68 sys-devel/automake: 1.11.1-r1 sys-devel/binutils: 2.21.1-r1 sys-devel/gcc: 4.5.3-r1 sys-devel/gcc-config: 1.4.1-r1 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r3 sys-kernel/linux-headers: 2.6.39 (virtual/os-headers) sys-libs/glibc: 2.13-r4 Repositories: gentoo Installed sets: ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=native -O2 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org/" LC_ALL="en_DK.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j6 -s" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="acl ads amd64 blksha1 bzip2 caps client curl dhcp fam hardened idn ikev1 ikev2 ipv6 ldap logrotate lzma mta nat ncurses netapi nfsv3 nls nptl oldnet openssl pam pam_krb5 python readline sasl server sha1 sha512 smbclient snmp ssl symlink syslog threads unicode usb winbind xml zlib" ELIBC="glibc" KERNEL="linux" USERLAND="GNU" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
It's probably that you're trying to use caps and didn't set things up properly, but attach your syslog-ng.conf file and /etc/conf.d/syslog-ng in case there's something there that's causing issues.
Created attachment 287733 [details] conf.d file
Created attachment 287735 [details] syslog-ng.conf
There you go :)
Oh, you're using hardened. I don't support that config. Reassigning to the hardened team.
It doesn't look like he's using hardened. "Portage 2.2.0_alpha59 (default/linux/amd64/10.0/no-multilib, gcc-4.5.3, unavailable, 3.0.4-gentoo x86_64)" Reassign.
Then the hardened use flag shouldn't be set. That's for the hardened profiles. Also, unless you really know how to use caps you should unset that use flag as well.
Removing the caps use flag fixes the problem. I'm not removing the hardened use flag, since it causes it to install a very limited syslog-ng.conf file. Btw. why does the non-hardened use flag version of syslog-ng not split the logfile out into different files?
The simple config file simplifies the rotation support and, since most people don't need broken-out log files generally makes support easier. People who need or desire more complicated configs usually have particular needs so would need to configure syslog-ng to fit their specific needs anyhow. Glad things are working for you now.