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.

/etc/hosts writing backwards

Discussion in 'General Discussion' started by alexheizer, Dec 13, 2004.

  1. alexheizer

    alexheizer Active Member

    Joined:
    Dec 17, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Every night my /etc/hosts file rewrites the main entry for my server backwards, which creates problems for people sending email from the Webmail programs. I know it rewrites it every night because I have to fix it every morning. It should read, for example (made up):
    64.50.129.72 server.domain.net server

    Instead it gets rewritten as:
    64.50.129.72 server server.domain.net

    I have recently had to rename my server, and my CPanel license was reset by the datacenter. My two questions are:
    1. Should I re-reset my servername?
    a. Will this fix this problem?
    b. Will I need my datacenter to re-reset my CPanel license?
    2. Alternatively, if I chmod my /etc/hosts to something like 544 (unwritable by all), will that cause anything to malfunction on CPanel's end? That information, once set, will never change unless/until the server gets assigned another IP address, at which time I can update it manually.

    Thanx
     
  2. linux-image

    linux-image Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    1,192
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    Root Administrator
    chattr +i /etc/hosts

    that will keep the file unchanged.
     
  3. alexheizer

    alexheizer Active Member

    Joined:
    Dec 17, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Thanks! But will it cause any problems with CPanel, if CPanel keeps trying to write to it? I don't know how CPanel handles getting frustrated, like will it just exit there, or will it give up and move on? If it gives up and moves on, then that's fine, if it bombs then that's bad. :)
     
  4. linux-image

    linux-image Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    1,192
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    Root Administrator
    i dont think there will be a problem.
     
  5. SEP800

    SEP800 Member

    Joined:
    Apr 27, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Middle-Earth
    I believe I am having the same issue. Any ideas as to why this happens?

    Thanks!
     
  6. alexheizer

    alexheizer Active Member

    Joined:
    Dec 17, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Did you also change your hostname after you had been initially set up? That's when this behavior began on my server.
     
  7. SEP800

    SEP800 Member

    Joined:
    Apr 27, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Middle-Earth
    alexheizer, I didn't touch a thing. It just started doing it out of the blue which I find weird. I think the new Stable build of cPanel is the culprit and this may be a bug. A big one at that. :eek:
     
Loading...

Share This Page