Results 1 to 6 of 6

Thread: Home folder owned by "nobody". Change owner or permitions.

  1. #1
    Join Date
    Jan 2007
    Beans
    173

    Question Home folder owned by "nobody". Change owner or permitions.

    I shared my home folder on one of my computers a cross the network and now the folders I created across the network say they are owned by nobody. And I can not change or remove or add to those folders from that computer its self. What command can I use to change the owner of everything in that home folder so that the computer it is on change make changes to the folder? I am no longer using the network. ( Router fried, bit torrent) and will soon be adding all files to that computer with with a portable hard drive.

  2. #2
    Join Date
    Feb 2008
    Location
    The Netherlands
    Beans
    154
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Home folder owned by "nobody". Change owner or permitions.

    i read about a command chown somewhere. try that in search and you should find useful info.
    the question to the answer on life, the universe and everything: close window$ and restart.
    i hate that window!

  3. #3
    Join Date
    May 2005
    Location
    Sweden
    Beans
    223
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: Home folder owned by "nobody". Change owner or permitions.

    To flesh out the answer a bit, you may want to look at chown's man file before you do anything, but to change the owner of all files in /home/user, you'd do:

    Code:
    chown -hvR user /home/user
    where "user" is the name of the owner you want to change it to.

  4. #4
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: Home folder owned by "nobody". Change owner or permitions.

    You should not share your home directory, rather share a directory within $HOME such as :

    ~/share
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  5. #5
    Join Date
    Feb 2008
    Location
    The Netherlands
    Beans
    154
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Home folder owned by "nobody". Change owner or permitions.

    Quote Originally Posted by bodhi.zazen View Post
    You should not share your home directory, rather share a directory within $HOME such as :

    ~/share
    as i recall sharing your home dir will shut you out? you would log in and be logged out in about 15 seconds? this is one of the reasons why i recommended searching the treasure trove of info this forum is. my own knowledge on permissions and ownership is very limited. and i'm aware now of the dangers being rash.
    the question to the answer on life, the universe and everything: close window$ and restart.
    i hate that window!

  6. #6
    Join Date
    Mar 2007
    Beans
    15

    Re: Home folder owned by "nobody". Change owner or permitions.

    Sharing a folder within a home directory is good for simple situations. You can handle more general cases if you understand how Unix permissions work.

    Every user has a user ID (uid) and group ID (gid). You should never share a user ID, share a login, or anything like that. That login and user ID should always be limited to one and only one person.

    But users belong to groups. And you can set up the group permissions on files and folders to allow members of a group to share the files.

    Ubuntu creates a separate group for each user, with the group name the same as the user name. But you can belong to more than one group.

    Say you wanted to share music with another user. Add a user named 'music' to the system, which will also add a group named 'music'. Then you can add the other users to that group. Change the permissions on /home/music to allow members of the group access, and you have a shared folder where you can control exactly who has access and who doesn't - by controlling membership in the group. By the way, you would never log in as 'music'; this just an easy way to add the group and the shared folder in a standard location.

    Most projects can be handled this way. You can belong to as many groups as you need. If a file or folder has group permissions, and you belong to that group, you have those permissions.

    Assume 'andy' and 'bob' already exist. Then:

    sudo adduser music
    sudo adduser andy music
    sudo adduser bob music
    sudo chmod g+rws /home/music

    The chmod command adds read, write, and execute permission for the music group. Using 's' instead of 'x' means that anything added to that folder will get those same permissions, instead of your default permissions.

    It's a little trouble to set up, but worth it to have a folder for a project that more than one person, but not everyone, has access to.

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
  •