suge

Registered
PartnerNOC
Jan 3, 2005
2
0
151
Hello,

I am a customer support representative from the Hosting company Spry.
We currently have several accounts that use your cpanel application.
While most of the problems can be fixed in house, there is this one that
we are having a particular hard time on.

Everytime this customer switches his ip in the '/etc/hosts' file, the
next morning at 3:38 it switched it back to his default, causing
localhost errors and all kinds of errors. Now I traced the problem back
to the '/scripts/upcp' file. I commented out the fixetchost script call
and waited till the next day. Still didn't work. so I ask you, how can I
get cpanel to not change the hosts file?

Regards,
Chris Ruschmann
Spry Hosting
 

sparek-3

Well-Known Member
Aug 10, 2002
2,021
227
368
cPanel Access Level
Root Administrator
You can make the file immutable, but I wouldn't recommend it. You can issue the command:

chattr +i /etc/hosts

This will prevent anything from writing to the file or making changes, if you want to edit the file you will have to remove the immutable bit with -i .