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 The system failed to lock the file

Discussion in 'E-mail Discussion' started by WorkinOnIt, Feb 20, 2017.

  1. WorkinOnIt

    WorkinOnIt Well-Known Member

    Joined:
    Aug 3, 2016
    Messages:
    136
    Likes Received:
    9
    Trophy Points:
    18
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi

    Can someone please assist with this issue?

    I terminated an account that was no longer in use and received this error message in WHM:

    API failure: The system failed to lock the file “/etc/mailips” because of an error: Permission denied

    Logged in as root
    CLOUDLINUX 6.8 x86_64 xenpv – ssd
    WHM 60.0 (build 36)
     
  2. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    703
    Likes Received:
    114
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Do you have this option set to on in WHM > Exim Configuration Manager

    "Reference /etc/mailips for outgoing SMTP connections"

    Also what is the output of:

    Code:
    # ls -l /etc/mailips
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. WorkinOnIt

    WorkinOnIt Well-Known Member

    Joined:
    Aug 3, 2016
    Messages:
    136
    Likes Received:
    9
    Trophy Points:
    18
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi thanks for your help;

    "Reference /etc/mailips for outgoing SMTP connections": Off (default)


    root@[~]# ls -l /etc/mailips
    -rw-r----- 1 root mail 19 Nov 9 2015 /etc/mailips

    The server is currently set to send mails from a specific IP address as we had spam issues with a previous IP.

    Send mail from account’s dedicated IP address: off (default)
     
    #3 WorkinOnIt, Feb 20, 2017
    Last edited: Feb 20, 2017
  4. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    703
    Likes Received:
    114
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Hmm what about:

    Code:
    # lsattr /etc/mailips
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. WorkinOnIt

    WorkinOnIt Well-Known Member

    Joined:
    Aug 3, 2016
    Messages:
    136
    Likes Received:
    9
    Trophy Points:
    18
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Is this what you mean?

    Code:
    user@[~]# sudo lsattr /etc/mailips
    
    ----ia--------- /etc/mailips
    
     
  6. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    703
    Likes Received:
    114
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    That's why, you have it chattr set to +i

    If you run

    Code:
    # chattr -i /etc/mailips
    this will fix it.

    Someone would have purposely set it to +i though, this stops the file from being modified/deleted so you may want to check with whomever else has root access to your server to see why they set that but if you have

    "Reference /etc/mailips for outgoing SMTP connections": Off (default)

    then /etc/mailips is doing nothing for you other than causing that error to be thrown.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelMichael likes this.
  7. WorkinOnIt

    WorkinOnIt Well-Known Member

    Joined:
    Aug 3, 2016
    Messages:
    136
    Likes Received:
    9
    Trophy Points:
    18
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    OK - thank you for your kind assistance.

    is now:

    user@[~]# sudo lsattr /etc/mailips

    ----a--------- /etc/mailips


    The old server admin has long since gone. I will keep an eye on the logs.
    I appreciate your help :-=)
     
  8. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    703
    Likes Received:
    114
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Perfect :)

    Feel free to create and terminate an account to test, but all should be good now.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. WorkinOnIt

    WorkinOnIt Well-Known Member

    Joined:
    Aug 3, 2016
    Messages:
    136
    Likes Received:
    9
    Trophy Points:
    18
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Well - it seems the issue has not gone away - I am now getting this message when I upgraded an account:


     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You may have a third-party plugin or script installed that's automatically changing the attributes on that file. Check to see if the immutable attribute was added back to that file:

    Code:
    stat /etc/mailips
    lsattr /etc/mailips
    Thank you.
     
    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