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 Problem

Discussion in 'General Discussion' started by suge, Jan 4, 2005.

  1. suge

    suge Registered
    PartnerNOC

    Joined:
    Jan 3, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  2. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,381
    Likes Received:
    23
    Trophy Points:
    38
    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 .
     
  3. sawbuck

    sawbuck Well-Known Member

    Joined:
    Jan 18, 2004
    Messages:
    1,367
    Likes Received:
    5
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
  4. suge

    suge Registered
    PartnerNOC

    Joined:
    Jan 3, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Thanks

    Thanks for all your help. :)
     
Loading...

Share This Page