Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED error: Ignoring alt-phpxx-newrelic-daemon because of bad file mode - must be 0644 or 0444.

Discussion in 'General Discussion' started by webicom, Jul 4, 2018.

  1. webicom

    webicom Well-Known Member

    Joined:
    Mar 30, 2004
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    Slovenia
    Hello,

    Today I got error:

    Anacron job 'cron.daily' on server.xxxxx.com

    /etc/cron.daily/logrotate:
    error: Ignoring alt-php70-newrelic-daemon because of bad file mode - must be 0644 or 0444.
    error: Ignoring alt-php70-newrelic-php5 because of bad file mode - must be 0644 or 0444.
    error: Ignoring alt-php71-newrelic-daemon because of bad file mode - must be 0644 or 0444.
    error: Ignoring alt-php71-newrelic-php5 because of bad file mode - must be 0644 or 0444.
    error: Ignoring alt-php72-newrelic-daemon because of bad file mode - must be 0644 or 0444.

    error: Ignoring alt-php72-newrelic-php5 because of bad file mode - must be 0644 or 0444.

    How can I fix this?

    Best regards, Erik
     
  2. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    1,784
    Likes Received:
    132
    Trophy Points:
    118
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hello,

    It would appear that there are bad permissions on the newrelic related alt-php extensions. You'd need to change them to the suggested 644 or 444 for more information on where these are stored you should check out the CloudLinux documentation here: CloudLinux Documentation

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Phillip White

    Phillip White Registered

    Joined:
    Sep 15, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    76
    Location:
    Holbein
    cPanel Access Level:
    DataCenter Provider
    One thing to note (I too have encountered this error) this error seems to have been triggered after the extensions update yesterday.
     
  4. Rich Badaracco

    Rich Badaracco Registered

    Joined:
    Jun 29, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Longs, SC
    cPanel Access Level:
    Root Administrator
    Just in case this response was not helpful. I'll share how I found it. I used the find command, find / -name "alt-php70-newrelic-daemon" to locate the file. I found them in etc/logrotate.d/ and the files in the error email had permissions of 755 and were modified on 6/21/18. Hope this helps.
     
  5. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    1,784
    Likes Received:
    132
    Trophy Points:
    118
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Rich Badaracco

    Thanks for the update, seems odd the files in question would be in the location you're noting but none the less thank you for adding here the solution that worked for you
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    691
    Likes Received:
    233
    Trophy Points:
    43
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    These files are the logrotate configuration files for the newrelic logs (that are in /var/log/) and are read by /etc/logrotate.conf that includes any files dropped into /etc/logrotate.d

    It does seem strange that they should have been set as 0755 (which is essentially 0644 plus the execute flag).

    The files are only txt content eg
    Code:
    /var/log/alt-php70-newrelic/newrelic-daemon.log {
        rotate 7
        daily
        missingok
        notifempty
        sharedscripts
        copytruncate
        compress
    }
    and, as such, should not require an executable flag to be set - it should be sufficient that they can be globally read (0444) as a minimum requirement, but future updates may have issues overwriting the files unless they are set to 0644

    I suspect someone running a Windows OS was responsible for packaging the files for the update :(
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #6 rpvw, Jul 5, 2018
    Last edited: Jul 5, 2018
  7. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    1,784
    Likes Received:
    132
    Trophy Points:
    118
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    I understood what they are just seemed odd it was the logrotate files that were causing the issue, my first assumption would have been files located in CloudLinux's alt-php directory
    opt/alt/php70/usr/bin/newrelic-daemon. None the less now that I re-read the original error it makes a lot more sense that it would lead to the logrotate files.

    While this is a CloudLinux issue I took another look through our ticket system to see if we have any reports on this and this time I found a few. It looks like the proper resolution would be to do something like:

    Code:
    rpm --setperms  alt-php70-newrelic-daemon
    Since the RPM has the incorrect permissions

    In general though it may be best to contact CloudLinux directly Submit a request – CloudLinux
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Mark West

    Mark West Registered

    Joined:
    Jul 6, 2018
    Messages:
    1
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    United Kingdom
    cPanel Access Level:
    Root Administrator
    I logged a ticket with Cloudlinux - this is their reply:

    Just perform the following command:
    chmod 644 /etc/logrotate.d/alt-php*
    You will not receive such notices anymore.

    I have also created an internal task for our development team to fix it permanently in the future releases of alt-php packages.
    The task ID is ALTPHP-536. You may want to subscribe to our blog CloudLinux - Main | New template . The ID will be posted there when fixed.
     
    sneader likes this.
  9. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    1,784
    Likes Received:
    132
    Trophy Points:
    118
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Mark West

    That's great to know, I'm glad they've opened a case on it and glad you got their official solution.

    Thank you for updating here.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice