Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jan 2011 17:24:10 -0500
From:      Chris Brennan <xaero@xaerolimit.net>
To:        Swe Gill <swegill@gmail.com>
Cc:        Pegasus Mc Cleaft <ken@mthelicon.com>, freebsd-questions@freebsd.org
Subject:   Re: httpd-modsec2_debug.log: Operation not permitted
Message-ID:  <AANLkTi=jWTWY-tjrOV8GEZyPWGL6iPEQpvckBnMKwBPx@mail.gmail.com>
In-Reply-To: <AANLkTimkY0mNB%2BDyX0kd_7KxfoPy2ccUTAH361LLQoBa@mail.gmail.com>
References:  <AANLkTimk-EXkEKQ80QVBg5utpbt3SU1LK_eAvSfk6Skt@mail.gmail.com> <000301cbb307$49788810$dc699830$@com> <AANLkTik%2Bsb96kA=R8Bv5uSSc7ZeC-JSDYJb9%2BQhQ=oE5@mail.gmail.com> <AANLkTin4-BwqtaxC1Qy0dABKOGj4Y5XyjM7SiDmSSkeT@mail.gmail.com> <AANLkTi=qMBswOhgJH5=uucHcXH7LwrtwZHSz_pTdJF7O@mail.gmail.com> <AANLkTi=ume7fwpV91VuzCMkv5krVhdAdGjO6Wb%2B6AJL3@mail.gmail.com> <AANLkTimkY0mNB%2BDyX0kd_7KxfoPy2ccUTAH361LLQoBa@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 13, 2011 at 5:08 PM, Swe Gill <swegill@gmail.com> wrote:

> That is the problem. One file sizes upto 50GB and other 3 GB...
>
>  52872944 -rw-rw----   1 root  wheel      50G Jan 13 22:51
> httpd-modsec2_audit.log
>   3320928 -rw-rw----   1 root  wheel     3.2G Jan 13 22:51
> httpd-modsec2_debug.log
>
> I am just standing nowhere to remove the files....
>
> have tried by setting flags, changing modes.... all as a root but no luck
> yet...
>
> Any help?
>
> /S
>
>
Sweet Jebus! Ever hear of logrotate[1]? That would at least have solved this
problem in advance. My previous idea still stands. I believe rm (-f) still
requires *SOME* free space on a device to delete something. That being said,
do you have more then 50G free elsewhere on the system? Say /home
(/usr/home)? If you do, mv the file from /var/log to /usr/home. This would
effectively delete it from /var/log and free up it's space. Once it's moved
to a different location, you should have no problems doing with it as you
wish, compress and archive it or just arbitrarily delete it from the new
device if no backup is needed.


[1] I use a default setup for logrotate, it then archives each file in
/var/log, I then just archive /var/log/*.bz2 based on date and delete the
old bz2 archives from /var/log. This keeps /var/log pretty trimmed and the
only time it runs out of space is when something goes wild and eats up all
of it's space before logrotate can clean things up.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=jWTWY-tjrOV8GEZyPWGL6iPEQpvckBnMKwBPx>