Delete cPanel Log files
I must delete this large (1GB+) logfiles:
/usr/local/apache/logs/error_log
/usr/local/apache/logs/access_log
/usr/local/cpanel/logs/spamd_error_log
/usr/local/cpanel/logs/cpwrapd_log
/usr/local/cpanel/logs/cpdavd_session_log
/usr/local/cpanel/logs/error_log
/usr/local/cpanel/logs/access_log
/usr/local/cpanel/logs/tailwatchd_log
Results with: root@server [~]# rm /usr/local/cpanel/logs/spamd_error_log rm: remove regular file `/usr/local/cpanel/logs/spamd_error_log'? y rm: cannot remove `/usr/local/cpanel/logs/spamd_error_log': Operation not permitted root@server [~]# whoami root
How to?
Results with: root@server [~]# rm /usr/local/cpanel/logs/spamd_error_log rm: remove regular file `/usr/local/cpanel/logs/spamd_error_log'? y rm: cannot remove `/usr/local/cpanel/logs/spamd_error_log': Operation not permitted root@server [~]# whoami root
How to?
-
This document link may be of some use to you: How to Clean Unmanaged Log Files - cPanel Knowledge Base - cPanel Documentation 0 -
Does not work: [/usr/local/cpanel/logs]# cat /dev/null > spamd_error_log -bash: spamd_error_log: Operation not permitted 0 -
Ok, found a way. spamd looks to be not added per default for log rotation. 0 -
Ok, found a way. spamd looks to be not added per default for log rotation.
hi please tell me which way you use to delete spamd_error_log0 -
hi please tell me which way you use to delete spamd_error_log
Hello, You can select "spamd_error_log" for rotation via "WHM >> Service Configuration >> cPanel Log Rotation Configuration". It will then rotate during the next cpanellogd run according to the value configured for "Log Rotation Size Threshold" in "WHM >> Tweak Settings". Thank you.0 -
If you want to empty it quickly do this: chattr -a spamd_error_log > spamd_error_log
You can change it back with +a if you want.0
Please sign in to leave a comment.
Comments
6 comments