Page 1 of 2
Re: /bin/sh: /usr/local/bandmin/bandmin: No such file or directory
Posted: 25 Sep 2019, 05:33
by oizumi
I also started to receive this messages this week. I Googled it and some people suggest to disable this command from Cron. Not sure if this is the correct solution.
Does anyone know how to fix it?
Re: /bin/sh: /usr/local/bandmin/bandmin: No such file or directory
Posted: 25 Sep 2019, 07:49
by BallyBasic79
Bandmin Removed Warning
Warning:
We removed the Bandmin feature from cPanel & WHM version 58. The Bandmin feature only exists in cPanel & WHM version 56 and earlier.
CSF Changelog
7.00 -
Ensure /usr/local/bandmin/bandminstart exists and is executable on cPanel servers before using it
csf.conf
# This settings re-enables the cPanel Bandwith chains after iptables is
# configured. If bandmin is not functioning, or you don't use the bandmin stats
# you can disable this option
LF_CPANEL_BANDMIN = "1"
Unless you have a cPanel server v. 56 or earlier – and using bandmin necessarily – it should not be something you have or need. CSF is supposed to be checking for its existence before trying to stop or restart it, but that must be failing somehow.
Do you have LF_CPANEL_BANDMIN = "1"? If so, set to 0 and that should force CSF to ignore it. HTH
Re: /bin/sh: /usr/local/bandmin/bandmin: No such file or directory
Posted: 30 Sep 2019, 17:40
by LukeDouglas
I have LF_CPANEL_BANDMIN = "OFF" configured. Yet I still get emails.
---------- Forwarded message ---------
From: (Cron Daemon) <
root@web.webbering.net>
Date: Mon, Sep 30, 2019 at 10:10 AM
Subject: {Spam?} Cron <root@web> /usr/local/bandmin/bandmin
To: <
root@web.webbering.net>
/bin/sh: /usr/local/bandmin/bandmin: Is a directory
How can I disable any emails concerning 'bandmin' from being generated. I get them 2-3-4- times a day.
Re: /bin/sh: /usr/local/bandmin/bandmin: No such file or directory
Posted: 30 Sep 2019, 18:41
by BallyBasic79
I'm glad that you posted your setting. It says off, but it is not off.
LukeDouglas wrote: ↑30 Sep 2019, 17:40
I have LF_CPANEL_BANDMIN = "OFF" configured. Yet I still get emails.
To verify this issue, I searched the source code for this setting. Line 1293 of the
dostart function in
csf.pl checks for two positive conditions:
setting is on and
bandminstart exists on your disk.
Code: Select all
if ($config{LF_CPANEL_BANDMIN} and -x "/usr/local/bandmin/bandminstart") {
Note that the LF_CPANEL_BANDMIN test is true or false – a value exists or it does not.
"1", "TRUE", "nope" are true values.
"0", "" are false values.
And there is a test to ensure that bandminstart exists, so you must still have that on your disk.
I suggest that you change your config to
LF_CPANEL_BANDMIN ="0" and check for any other settings that needs to be corrected similarly. Then restart csf+lfd. You might also check for /bandmin and remove it. HTH
Re: /bin/sh: /usr/local/bandmin/bandmin: No such file or directory
Posted: 30 Sep 2019, 19:51
by LukeDouglas
I checked the /etc/csf/csf.conf file and here are the settings:
# This settings re-enables the cPanel Bandwith chains after iptables is
# configured. If bandmin is not functioning, or you don't use the bandmin stats
# you can disable this option
LF_CPANEL_BANDMIN = "0"
I had removed the /usr/local/bandmin folder..
Any other ideas?
Re: /bin/sh: /usr/local/bandmin/bandmin: No such file or directory
Posted: 01 Oct 2019, 07:29
by BallyBasic79
Will you post an example of the message with subject line and content? (Feel free to censor sensitive info.)
Re: /bin/sh: /usr/local/bandmin/bandmin: No such file or directory
Posted: 01 Oct 2019, 18:02
by LukeDouglas
Here are three of about 30-35 just in the last month.
---------- Forwarded message ---------
From: (Cron Daemon) <
root@web.XXXXXXXX.net>
Date: Mon, Sep 30, 2019 at 11:40 AM
Subject: {Spam?} Cron <root@web> /usr/local/bandmin/bandmin
To: <
root@web.XXXXXXXX.net>
/bin/sh: /usr/local/bandmin/bandmin: Is a directory
---------- Forwarded message ---------
From: (Cron Daemon) <
root@web.XXXXXXXX.net>
Date: Wed, Sep 25, 2019 at 12:10 AM
Subject: Cron <root@web> /usr/local/bandmin/ipaddrmap
To: <
root@web.XXXXXXXX.net>
/bin/sh: /usr/local/bandmin/ipaddrmap: No such file or directory
---------- Forwarded message ---------
From: (Cron Daemon) <
root@web.XXXXXXXX.net>
Date: Thu, Sep 19, 2019 at 7:10 AM
Subject: Cron <root@web> /usr/local/bandmin/bandmin
To: <
root@web.XXXXXXXX.net>
/bin/sh: /usr/local/bandmin/bandmin: No such file or directory
Re: /bin/sh: /usr/local/bandmin/bandmin: No such file or directory
Posted: 01 Oct 2019, 18:04
by LukeDouglas
One more ...after I deleted the /usr/local/bandmin directory.
---------- Forwarded message ---------
From: (Cron Daemon) <
root@web.XXXXXXXX.net>
Date: Mon, Sep 30, 2019 at 8:40 PM
Subject: {Spam?} Cron <root@web> /usr/local/bandmin/bandmin
To: <
root@web.XXXXXXXX.net>
/bin/sh: /usr/local/bandmin/bandmin: No such file or directory
Re: /bin/sh: /usr/local/bandmin/bandmin: No such file or directory
Posted: 02 Oct 2019, 04:13
by BallyBasic79
Dude – this isn't adding up.
Which CSF version are you running? Please confirm.
The
Mon, Sep 30, 2019 at 11:40 AM message below states that
/usr/local/bandmin/ exists, but you state that it doesn't.
LukeDouglas wrote: ↑01 Oct 2019, 18:02
Here are three of about 30-35 just in the last month.
---------- Forwarded message ---------
From: (Cron Daemon) <
root@web.XXXXXXXX.net>
Date: Mon, Sep 30, 2019 at 11:40 AM
Subject: {Spam?} Cron <root@web> /usr/local/bandmin/bandmin
To: <
root@web.XXXXXXXX.net>
/bin/sh: /usr/local/bandmin/bandmin: Is a directory
I've been through the source code several times and not found anything related to bandmin but a check for the setting and directory existence when stopping and restarting.
About the time of these messages, do you see the following in the lfd.log?
Restarting bandmin acctboth chains for cPanel
The only other thing is maybe some cron job is old and testing bandmin. You could check in:
'/etc/cron.d','/etc/cron.daily','/etc/cron.hourly','/etc/cron.weekly'
Re: /bin/sh: /usr/local/bandmin/bandmin: No such file or directory
Posted: 02 Oct 2019, 21:34
by LukeDouglas
I manually removed the /user/local/bandmin directory. I checked all cron jobs and did not see any bandmin text anywhere.