Skip to main content

Hostname can not change

Comments

5 comments

  • Jcats
    Are you using OpenVZ and Centos7? Its an issue with SolusVM I believe. 1. Set the hostname in WHM 2. in SSH run:
    # chattr +i /etc/hostname
    Reboot, it will stick. In the future, if you need to change the hostname you have to run:
    # chattr -i /etc/hostname
    0
  • Gojko
    You are right. That was it. Solved.
    0
  • Jcats
    Glad to hear it :)
    0
  • Sagar.webhost
    Hello, Yes chattr will solve issue. Changing hostname on node end also required as when VPS restart it use hostname which is set in configuration of vps on node. Once it is changed on node end no need of chattr.
    0
  • cPanelMichael
    Hello, You may want to report the issue to your VPS hosting provider instead of adding the immutable attribute to the /etc/hostname file. They should be able to provide you with instructions on how to save a new hostname to your VPS configuration. Thank you.
    0

Please sign in to leave a comment.