Thursday 6 March 2014

A tale of false alarm by ConfigServer, CPanel and a hosting provider.


I'm responsible for a couple of CPanel/WHM managed dedicated servers.

We  keep them updated, and try to do as little customization as possible outside of what cPanel knows about. We enabled mod_proxy_fcgi and PHP-FPM, so we can use Apache 2.4 MPM Event for our fairly high traffic web site. It's a unfortunate that CPanel doesn't have this configuration available out of the box, but that's for another blog post.

Today early in the morning we got a message from our lfd daemon (a service installed by a free ConfigServer Security & Firewall CPanel plugin installed by our hosting provider):

The following list of files have FAILED the md5sum comparison test. This means that the file has been changed in some way. This could be a result of an OS update or application upgrade. If the change is unexpected it should be investigated:
/usr/bin/ghostscript: FAILED
/usr/bin/gs: FAILED

The funny thing is, nothing upgraded any RPM files in this time window, our /var/log/yum.log didn't mention any upgrades to ghostscript package that provides the /usr/bin/gs binary (/usr/bin/ghostscript is a symlink to gs), we have disabled automatic updates that can be initiated by the cpanel upcp --cron sciprt, but the system us regulagrly kept up to date manually with yum update.

I've reinstalled the package with yum reinstall ghostscript (ghostscript-8.70-19.el6.x86_64 was reinstalled)

and the binary size and md5sum changed like this:

before:
size: 19152 bytes
md5sum: c64b5016d94450b476148c31cfef61ff

after reinstall:
size: 6760 bytes
md5sum: 73db43e258c4b191757b7ba75a883321

This is what actually happened: Our managed hosting provider had apparently changed our setup to upgrade our system packages automatically (probably with best intentions due to recent gnutls issue). And prelinking seems to be enabled on our system, so when upcp (CPanel automatic upgrade cron script that runs periodically) executed /usr/local/cpanel/scripts/rpmup to upgrade system packages, it also did the prelinking step, adding extra prelinking stuff to our /usr/bin/gs binary.

Similar issue described here:

http://linsec.ca/blog/2012/01/23/rpm-v-and-prelinked-binaries/


6 comments:

  1. Hi Dugo ,

    Yes its sad cpanel doesnt support Apache Event MPM +PHP-FPM out of the box. But I have written a script that will help you achieve this with a high degree of compatibility . Please check https://support.sysally.net/projects/cphstack . Let me know your feedback .

    ReplyDelete
  2. Many thanks for the exciting blog posting! I really enjoyed reading it, you are a brilliant writer. I actually added your blog to my favorites and will look forward for more updates. Great Job, Keep it up..
    website hosting australia

    ReplyDelete
  3. اما ممکن است این سوال به ذهنتان بیاید که یک خرید هاست خرید هاست اشتراکی ارزان ارزان چه هاستی است و چه ویژگی هایی باید دارا باشد در ادامه مقاله قصد داریم ویژگی های هاست ارزان را معرفی کنیم و در آخر به معرفی بهترین هاست ایران از میان هاستینگ های برتر کشور بپردازیم .اگر قصد راه اندازی یک سایت باکیفیت و پر بازدید را دارید حتما باید نکته هایی را رعایت نمایید قسمت سخت افزار از انتخاب ها تشکیل می شود و مناسب برای سایت هست که به سرور استفاده شده با سی پی یو ، رم و استفاده از دیگر سخت افزارها با ویژگی های عنوان شده مربوط می شود هاست پرسرعت برای وردپرس .نرم افراز به دو بخش جدا تقسیم می شود که بخشی از آن به هاست و سرور مربوط هست و بخش دیگر به سیستم مدیریت محتوا سایت شما بستگی دارد .و در نهایت بخش محتوا ارتباط با کار سئو و بهینه سازی سایت برای موتورهای جستجو و هم چنین بازاریابی خرید هاست لینوکسی ارزان از طریق محتوا است .در حقیقت هاست یک بستر الکترونیکی هست که محتویات و مطالب سایت شما داخل آن ذخیره خواهد شد .و این محتویات همان فایل و دیتابیس شما است که از طریق اتصال اینترنتی کاربران به سرور در دسترس خواهد بود .لازم است که هاست و دامنه به یک دیگر متصل باشند که این فرآیند از طریق Name server صورت می گیرد .بدین ترتیب اولین کاری که بعد از خرید هاست از شرکت های معتبر هاستینگ باید انجام دهید این هست که نیم سرور های هاست را بر روی دامنه خودتان ست کنید تا نهایتا بعد از گذشت ۷۲ ساعت هاست و دامنه به هم دیگر متصل شوند

    ReplyDelete
  4. Great post but I was wondering if you could write a little more on this subject? I’d be very thankful if you could elaborate a little bit further. Thanks in advance! Complete Alarm Systems

    ReplyDelete
  5. Pour acheter des kamas dofus visitez le site Acheter kamas dofus https://hostinglelo.in/

    ReplyDelete