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.

Trouble editing /etc/my.cnf file

Discussion in 'General Discussion' started by mbnorth, Feb 8, 2011.

  1. mbnorth

    mbnorth Registered

    Joined:
    Feb 8, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hey guys--

    I was able to get to /etc/my.cnf, but it's not allowing me to edit it, I right clicked on it to change the permission but still it's not letting me do it. Where else shall I go to change the permission so it can be edited?

    Thanks
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello mbnorth,

    I've moved your post into a new thread, since this is a different issue than the InnoDB questions that the other thread had.

    For your question, please run the following commands and paste the output:

    Code:
    lsattr /etc/my.cnf
    ls -lah /etc/my.cnf
    Next, are you ensuring you are root user when trying to edit the file? You will not be able to edit it as a jailed shell or wheel group user who hasn't su or sudo to root.

    Thanks.
     
  3. mbnorth

    mbnorth Registered

    Joined:
    Feb 8, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for your response cPanelTristan.

    Here's the output:
    root@host [~]# lsattr /etc/my.cnf
    -------A----- /etc/my.cnf
    root@host [~]# ls -lah /etc/my.cnf
    -rw-r--r-- 1 root root 22 Feb 7 03:41 /etc/my.cnf
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    What message are you getting when trying to edit it precisely? You should be able to save any edits on that file.
     
  5. mbnorth

    mbnorth Registered

    Joined:
    Feb 8, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    After I hit the save button once I finish editing. There is a several lines message.
    Here they are:

    - Cannot overwrite remote file '/etc/my.cfn'.
    - Permission denied.
    - Error code: 3
    - Error message from server: Permission denied.
    - Request code: 3
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,451
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Where are you editing this from that has a save button if I may ask?
     
  7. mbnorth

    mbnorth Registered

    Joined:
    Feb 8, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I'm using WinSCP.
    It's the only one I think I can manage easier at this point.
     
  8. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I believe you are going to need to use putty instead, since it sounds like it isn't trying to actually edit the file but overwrite the file ("Cannot overwrite remote file" error indicates you aren't editing the file by trying to replace it with another copy).

    Here's the link for putty:

    PuTTY Download Page

    If you have questions on using it, please let us know.
     
Loading...

Share This Page