alexheizer

Active Member
Dec 17, 2003
37
0
156
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
 

alexheizer

Active Member
Dec 17, 2003
37
0
156
linux-image said:
chattr +i /etc/hosts

that will keep the file unchanged.
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. :)
 

alexheizer

Active Member
Dec 17, 2003
37
0
156
SEP800 said:
I believe I am having the same issue. Any ideas as to why this happens?

Thanks!
Did you also change your hostname after you had been initially set up? That's when this behavior began on my server.
 

SEP800

Member
Apr 27, 2004
6
0
151
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: