The system failed to lock the file
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)
-
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: # ls -l /etc/mailips0 -
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) 0 -
Hmm what about: # lsattr /etc/mailips0 -
Is this what you mean? user@[~]# sudo lsattr /etc/mailips ----ia--------- /etc/mailips0 -
That's why, you have it chattr set to +i If you run # 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.0 -
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 :-=) 0 -
Perfect :) Feel free to create and terminate an account to test, but all should be good now. 0 -
Hello, I'm happy to see the issue is now addressed. Note that manual changes were made to that file in the past to customize the IP address used by Exim for sending emails. Documentation on the supported method of making that type of change is available at: How to Configure the Exim Outgoing IP Address - cPanel Knowledge Base - cPanel Documentation Thank you. 0 -
Well - it seems the issue has not gone away - I am now getting this message when I upgraded an account: (XID 8rks47) The system failed to lock the file "/etc/mailips" because of an error: Operation not permitted at /usr/local/cpanel/Cpanel/Transaction/File/Base.pm line 132. Cpanel::Transaction::File::Base::new("Cpanel::Transaction::File::Raw", "path", "/etc/mailips", "permissions", 416, "ownership", ARRAY(0x5b8a318)) called at /usr/local/cpanel/Cpanel/Userdomains/CORE.pm line 429 Cpanel::Userdomains::CORE::_create_transaction(Cpanel::Userdomains::CORE=HASH(0x58436b0), HASH(0x58746e0)) called at /usr/local/cpanel/Cpanel/Userdomains/CORE.pm line 120 Cpanel::Userdomains::CORE::update(Cpanel::Userdomains::CORE=HASH(0x58436b0), "force", 0) called at /usr/local/cpanel/Cpanel/Userdomains.pm line 25 Cpanel::Userdomains::updateuserdomains() called at /usr/local/cpanel/Whostmgr/Accounts.pm line 610 Whostmgr::Accounts::_upacct("user", "clientabc", "pkg", "Standard") called at whostmgr/bin/whostmgr2.pl line 6430 main::upacct() called at whostmgr/bin/whostmgr2.pl line 1042 0 -
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: stat /etc/mailips lsattr /etc/mailips
Thank you.0
Please sign in to leave a comment.
Comments
10 comments