Results 1 to 9 of 9

Thread: my whole home folder is "owned" by root

  1. #1
    Join Date
    Sep 2007
    Beans
    35

    my whole home folder is "owned" by root

    ok what happened was I had another installation but it was masses up so i decided to reinstall i went with the live cd and made a "tar.gz" archive of my home folder and put it on flash media but i did it with sudo. so when i reinstalled i went to copy it to the home and it didn't copy so i used sudo to copy it then it sorta didn't work i had to change the file permissions the folder to me. and then it would let me log in but like 90% of it is still owned my root so programs cant use. how can i change the permissions of all m files in the home folder to me.

  2. #2
    Join Date
    Jun 2008
    Beans
    301
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: my whole home folder is "owned" by root

    you could do


    sudo chown -R <your name> /home/<your name>

    should do it

  3. #3
    Join Date
    Sep 2007
    Location
    Masschusetts
    Beans
    1,510
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: my whole home folder is "owned" by root

    permissions and ownership are two different (though connected) things.

    sudo chown -R username /home/username
    to change owner

    sudo chmod 700 /home/username
    to change permission for owner to read/write/execute and no access for anyone else other than root
    Registered Linux User: 482377
    MacBook (1,1) - OS X Leopard
    ASUS P5LD2 - Core 2 Duo 3.0GHz - 2GB Corsair RAM - Nvidia 8800GT - Ubuntu 9.04 / Windows 7 Professional

  4. #4
    Join Date
    Nov 2006
    Location
    40.31996,-80.607213
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: my whole home folder is "owned" by root

    Try:
    Code:
    sudo chown -R $USER:$USER /home/$USER
    "Security lies within the user of who runs the system. Think smart, live safe." - Dr Small
    Linux User #441960 | Wiki: DrSmall

  5. #5
    Join Date
    Jun 2008
    Beans
    301
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: my whole home folder is "owned" by root

    when using cp you should keep in mind that cp dosent keep things like time stamps ownership or permissions unless you tell it to... use -a to keep them (i think its -a could be wrong)

  6. #6
    Join Date
    Sep 2007
    Beans
    35

    Re: my whole home folder is "owned" by root

    Quote Originally Posted by DGortze380 View Post
    sudo chmod 700 /home/username
    to change permission for owner to read/write/execute and no access for anyone else other than root
    i think that cammand worked

  7. #7
    Join Date
    May 2005
    Location
    US
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: my whole home folder is "owned" by root

    What's done is done, but I would have advised to do the chown but not the chmod. Not everything in your home directory is supposed to have the same permissions.

  8. #8
    Join Date
    Sep 2007
    Location
    Masschusetts
    Beans
    1,510
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: my whole home folder is "owned" by root

    Quote Originally Posted by aysiu View Post
    What's done is done, but I would have advised to do the chown but not the chmod. Not everything in your home directory is supposed to have the same permissions.
    Didn't tell him to chmod everything. Actually, the first command I gave him was to chown. I explained both commands. permissions can always be changed as needed if he runs into problems.
    Registered Linux User: 482377
    MacBook (1,1) - OS X Leopard
    ASUS P5LD2 - Core 2 Duo 3.0GHz - 2GB Corsair RAM - Nvidia 8800GT - Ubuntu 9.04 / Windows 7 Professional

  9. #9
    Join Date
    May 2005
    Location
    US
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: my whole home folder is "owned" by root

    Quote Originally Posted by DGortze380 View Post
    Didn't tell him to chmod everything. Actually, the first command I gave him was to chown. I explained both commands. permissions can always be changed as needed if he runs into problems.
    In post #3, you said
    Quote Originally Posted by You
    sudo chmod 700 /home/username
    to change permission for owner to read/write/execute and no access for anyone else other than root
    And I'm saying that can break your installation, as not everything in your home directory is supposed to have the same permissions set.

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
  •