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.

Can't edit .bash_profile

Discussion in 'General Discussion' started by Finley Ave, Jan 6, 2007.

  1. Finley Ave

    Finley Ave Active Member

    Joined:
    Feb 28, 2004
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    San Ramon, CA
    When I try to edit, rename, or change permissions for root .bash_profile, I get permission denied. The permissions showing are 644, owner and group is root. I have this problem only recently on both my cpanel boxes, but not on a non-cpanel box. Any help is appreciated.
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You've probably chattr'd the file (or installed a script that did so). You can check with:

    lsattr .bash_profile

    If it's not all dashes then you need to remove the attribute. It's probably immutable (i), so to remove that you would:

    chattr -i .bash_profile
     
  3. Finley Ave

    Finley Ave Active Member

    Joined:
    Feb 28, 2004
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    San Ramon, CA
    Thanks, that did it.
     
Loading...

Share This Page