Results 1 to 9 of 9

Thread: The .bash_history file is owned by root

Hybrid View

  1. #1
    Join Date
    Dec 2008
    Beans
    7

    The .bash_history file is owned by root

    After a clean install of Ubuntu Intrepid Ibex (8.10, alternate cd, amd64), bash history was never saved. After a long while fiddling with it, I eventually found that this is was due to the fact that .bash_history was owned by root! With permissions of 600, when logged in as the normal user, I could not write to the file.

    Searching the forums I found this thread about the same issue, and tried to reply to it, but it was closed, so I decided to ask this here: did anyone else had the same trouble? Is it a known bug?

    Cheers

  2. #2
    Join Date
    Oct 2005
    Location
    Jacksonville, FL
    Beans
    29,420

    Re: The .bash_history file is owned by root

    Just change the ownership of ~/.bash_history from root back to your login name. Assuming your login name is john, you would run

    Code:
    sudo chown  john:john /home/john/.bash_history
    ls -la
    In the world of Linux, who needs Windows and Gates...

    Got most of my golden beans at an auction on eBay (with a couple of free drinks).

  3. #3
    Join Date
    Dec 2008
    Beans
    7

    Re: The .bash_history file is owned by root

    Thanks for the quick feedback, but I have done that already (forgot to say that in previous post, sorry). My question was rather if this is a known bug or not. As stated in the link of my first post, the same situation happened with earlier versions of ubuntu, hence my question.

    But I still appreciated the quick feedback

  4. #4
    Join Date
    Apr 2006
    Location
    Ubuntuland
    Beans
    2,124
    Distro
    Ubuntu 13.10 Saucy Salamander

    Lightbulb Re: The .bash_history file is owned by root

    Quote Originally Posted by gauthma View Post
    My question was rather if this is a known bug or not. As stated in the link of my first post, the same situation happened with earlier versions of ubuntu, hence my question.
    My guess is a cockpit problem.

    I've never seen that on any of my Ubuntu machines and I've never heard of lots of people having that problem.

    Is is possible that you did something strange?
    24 beers in a case, 24 hours in a day. Coincidence? I think not!

    Trusty Tahr 64 bit, AMD Phenom II 955 Quad Core 3.2GHz, GeForce 9600 GT
    16G PC2-6400 RAM, 128 GB SSD, Twin 1TB SATA 7200 RPM RAID0

  5. #5
    Join Date
    Dec 2008
    Beans
    7

    Re: The .bash_history file is owned by root

    Quote Originally Posted by Slim Odds View Post
    Is is possible that you did something strange?
    While that's certainly not impossible, I do doubt it. In particular, I am certain that it wasn't me that made such a change! Do you have any idea of what changes could cause for something like this to happen, literally, automagically?

  6. #6
    Join Date
    Jul 2007
    Beans
    71

    Re: The .bash_history file is owned by root

    Quote Originally Posted by gauthma View Post
    Do you have any idea of what changes could cause for something like this to happen, literally, automagically?
    Running the user's first command ever as sudo may do something like that. Stuff like that.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •