The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Domain being removed from

Discussion in 'CloudLinux' started by hdctest, Aug 2, 2011.

  1. hdctest

    hdctest Member

    Joined:
    Nov 9, 2006
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    I have a server where the domain is being removed from /etc/userdomains at night for some reason.

    Mail client responds:
    Mail server
    mail.domain.com responded: Sorry cannot find an owner for that
    domain (domain.com)

    I add the domain back to /etc/userdomains to fix the issue.

    The server is using an old fedora 2 and cpanel version 11.3.0

    Any suggesstions?
     
  2. fi77i

    fi77i Well-Known Member

    Joined:
    Aug 20, 2008
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Uruguay
    cPanel Access Level:
    Root Administrator
    You can set the file inmutable to prevent the domain to be removed.
    The issue here is every time cpanel need to write something in there it won't work.
    You need to set inmutable to off and the set it on again.

    The command is:

    chattr +i /etc/userdomains

    and the following to set it off

    chattr -i /etc/userdomains
     
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    This suggestion is not the better way to handle this happening. The file cannot be set immutable unless you don't want any other domains ever added to it, breaking adding new accounts, addon domains, parked domains and subdomains.

    Additionally, manually re-adding domains to /etc/userdomains isn't a good method to get a domain working.

    First of all, move all these files and regenerate them properly without these manual edits:

    Code:
    mv /etc/userdomains /etc/userdomains.bak
    mv /etc/domainusers /etc/domainusers.bak
    mv /etc/trueuserdomains /etc/trueuserdomains.bak
    /scripts/updateuserdomains
    If that script when run mentions any domain missing or conflicting due to another user owning it, then that's the issue. You'd then want to go to /var/cpanel/users location and remove the domain from the user's file that shouldn't be owning it and re-run "/scripts/updateuserdomains" again.
     
  4. hdctest

    hdctest Member

    Joined:
    Nov 9, 2006
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Ok, I had to contact support. They found the server hostname was the same as the domain that was having the issue and that was the cause. I updated the hostname. Have to wait till tomorrow to verify it works.
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page