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.

Subdomains created in WHM - wrong owner?

Discussion in 'General Discussion' started by crwilliams, Aug 2, 2006.

  1. crwilliams

    crwilliams Well-Known Member

    Joined:
    Sep 10, 2002
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    I have a strange problem with a handful of subdomain accounts created in the WHM. The owner of some of the subdomains is listed as the domain user instead of the subdomain user, in some key places.

    For example, in looking at /usr/local/apache/domlogs, the ownership for a couple of the domains is root.primarydomain instead of root.subdomain

    And in /etc/valiases ownership is listed as primarydomain.mail instead of subdomain.mail

    When I manually chown, it's fixed, but with the overnight updates, the ownership is reverting to the primary domain user instead of the subdomain user. This is, of course, causing all kinds of problems with the subdomain mail delivery, and with the users being able to update their stats.

    It's not happening with all subdomains created in the WHM, though. I have probably 100 subdomains of a few of my own domains, but the problem is only happening with about 5 of the subdomains, all of them on the same primary domain of mine. So the problem is random, but with only one of the primary domains I use for subdomains.

    I did notice that even though the subdomains have their own DNS zones, some of them also had A records in the primary domain DNS zone-- all the ones reverting ownership to the primary domain were there. I removed them from the primary domain DNS zone entry, and checked their own DNS entry afterward, but this hasn't fixed the problem, and ownership of those select subdomains is still reverting with the nightly updates. As an experiment, I even tried making one of the subdomain users a reseller, but still no luck with the domlog, valias or vfilter ownerships reverting to the primary domain username.

    Any ideas or guidance on where to look next?
     
  2. jdfcomputers

    jdfcomputers Member

    Joined:
    Apr 12, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    check /var/cpanel/users/(username)

    also running

    /scripts/updateuserdomains

    httpd.conf file may also have subdomains listed under wrong user
     
  3. crwilliams

    crwilliams Well-Known Member

    Joined:
    Sep 10, 2002
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Finally figured it out (mostly). In case this is of use to anyone else, this is what happened...

    I believe that when I migrated a bunch of sites to a new machine, somehow those subdomains were literally created additionally as subdomains of the primary domain. I found them in the subdomains listed in the cpanel for the primary domain. They'd never been created there, but the folders for the subdomains all had approximately the same date and time on them when looking in SSH. So I think the directories were automatically created for them during the transfer to the new server, and that's when the ownership was changed to the primary domain user instead of the subdomain user.

    Be careful when removing them from the subdomain list in the primary domain's cpanel, if you find yourself in this situation. When you remove the subdomain from the cpanel of the primary domain, it does remove the entries for the subdomain from httpd.conf. I just finished manually editing the httpd.conf to get the entry back for one of the subdomains I removed via cpanel.

    You may also want to double check the DNS zone for your subdomain if you remove a version of it from a primary domain. Just to be on the safe side.

    I'll have to watch for the nightly updates to make sure the ownerships remain as they are, but I have the feeling this will finally take care of the problem.
     
Loading...

Share This Page