Your message dated Fri, 12 Aug 2011 09:21:59 +0100
with message-id <[email protected]>
and subject line Re: Bug#637510: logrotate: compresscmd non-functional
has caused the Debian Bug report #637510,
regarding logrotate: compresscmd non-functional
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
637510: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637510
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: logrotate
Version: 3.7.8-6
Severity: normal
compresscmd option is not operational
I get the following error when using it:
error: mylog:6 bad compress path "nice -n 10 lzma -9"
error: found error in /var/log/mylog.log , skipping
error: mylog:6 } expected
error: found error in file mylog, skipping
Following line causes this error:
compresscmd "nice -n 10 lzma -9"
-- Package-specific info:
Contents of /etc/logrotate.d
total 48
-rw-r--r-- 1 root root 173 Jan 25 2011 apt
-rw-r--r-- 1 root root 79 Oct 16 2010 aptitude
-rw-r--r-- 1 root root 135 Feb 25 2010 consolekit
-rw-r--r-- 1 root root 124 Jun 29 2009 dirmngr
-rw-r--r-- 1 root root 232 Jan 30 2011 dpkg
-rw-r--r-- 1 root root 146 Jan 31 2011 exim4-base
-rw-r--r-- 1 root root 126 Jan 31 2011 exim4-paniclog
-rw-r--r-- 1 root root 217 Jun 29 2010 fail2ban
-rw-r--r-- 1 root root 100 Feb 12 22:32 kdm
-rw-r--r-- 1 root root 157 Nov 17 2010 pm-utils
-rw-r--r-- 1 root root 94 Aug 9 2010 ppp
-rw-r--r-- 1 root root 515 Jul 11 13:56 rsyslog
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (700, 'testing'), (650, 'stable'), (600, 'unstable'), (500,
'stable-updates'), (100, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.39-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages logrotate depends on:
ii anacron 2.3-14 cron-like program that doesn't go
ii base-passwd 3.5.23 Debian base system master password
ii cron 3.0pl1-118 process scheduling daemon
ii libc6 2.13-10 Embedded GNU C Library: Shared lib
ii libpopt0 1.16-1 lib for parsing cmdline parameters
ii libselinux1 2.0.98-1.1 SELinux runtime shared libraries
Versions of packages logrotate recommends:
ii heirloom-mailx [mailx] 12.5-1 feature-rich BSD mail(1)
logrotate suggests no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
On Fri, Aug 12, 2011 at 10:09:47AM +0300, Yevgeny Kosarzhevsky wrote:
> compresscmd option is not operational
> I get the following error when using it:
> error: mylog:6 bad compress path "nice -n 10 lzma -9"
> error: found error in /var/log/mylog.log , skipping
> error: mylog:6 } expected
> error: found error in file mylog, skipping
>
> Following line causes this error:
> compresscmd "nice -n 10 lzma -9"
You can't do that. "nice -n 10 lzma -9" does not exist as an
executable file on your path. There is no program with the name
"nice -n 10 lzma -9".
This is by design -- to avoid shell based attacks (eg. a logfile
called "access.log;rm -rf /;log.1").
compresscmd "xz"
uncompresscmd "unxz"
compressext "xz"
compressoptions "-9"
If you want to nice down the compress process, you might have "nicexz"
as an executable script in /usr/local/bin, containing
#!/bin/sh
nice -n 10 xz "$@"
and have your compresscmd be "nicexz". Please note the use of quoted $@.
(For the older lzma program you would use: compresscmd "lzma",
uncompresscmd "unlzma" and compressext "lzma". Similarly with bzip2,
which may be better for log files, you would use: compresscmd "bzip2",
uncompresscmd "unbzip2", compressoptions "--best" and compressext "bz2".)
I hope this helps.
--
Paul Martin <[email protected]>
--- End Message ---