Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Take Ownership of Newly Installed Hard Drive

  1. #1
    Join Date
    May 2011
    Beans
    23

    Take Ownership of Newly Installed Hard Drive

    I recently installed a new 2.0 TB hard drive on by Ubuntu 11.04 system. I have visibility of the drive on Nautilus, but can't write to it. Owner shows as "root". How do I take ownership of this drive?

  2. #2
    Join Date
    Oct 2006
    Location
    U.K
    Beans
    41,356
    Distro
    Ubuntu Development Release

    Re: Take Ownership of Newly Installed Hard Drive

    https://help.ubuntu.com/community/In...gANewHardDrive

    Code:
    sudo chown -R USERNAME:USERNAME /media/mynewdrive
    replace USERNAME with your user name and mynewdrive with the name of the drive.

  3. #3
    Join Date
    Jun 2007
    Location
    Pretoria, South Africa
    Beans
    136
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Take Ownership of Newly Installed Hard Drive

    Quote Originally Posted by howefield View Post
    https://help.ubuntu.com/community/In...gANewHardDrive

    Code:
    sudo chown -R USERNAME:USERNAME /media/mynewdrive
    replace USERNAME with your user name and mynewdrive with the name of the drive.
    Ok I did as your suggested with "ai4kn" but this is my result:

    root@jan-desktop:~# sudo chown -R USERNAME:Jan /media/Samsung
    chown: invalid user: `USERNAME:Jan'
    root@jan-desktop:~# sudo chown -R Jan: /media/Samsung
    chown: invalid spec: `Jan:'
    root@jan-desktop:~# sudo chown -R Jan. /media/Samsung
    chown: invalid user: `Jan.'
    root@jan-desktop:~# sudo chown -R Group:Jan /media/Samsung
    chown: invalid user: `Group:Jan'
    root@jan-desktop:~#

    Regards Jan
    "Some people say if you play a windows cd backwards it plays satanic messages. That's nothing, because if you play it forwards it installs windows!" (Author unknown)

  4. #4
    Join Date
    May 2007
    Location
    The New Forest
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Take Ownership of Newly Installed Hard Drive

    Try jan - not Jan

    Linux is cAse sensitive

    If not logout of the root session and use whatever it says at the prompt - eg

    hobgoblin@hobgoblin

    mines hobgoblin

  5. #5
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 15.04 Vivid Vervet

    Re: Take Ownership of Newly Installed Hard Drive

    One useful little shortcut that doesn't seem to be well known. If you omit the group name, but leave a trailing colon, as in:

    Code:
    sudo chown -R yourusername: /media/mountpoint
    ... the chown command will apply whichever your default group is. Saves a few keystrokes and it works with chmod too.
    Ubuntu 15.04 Desktop Guide - Ubuntu 14.04 Desktop Guide - Forum Guide to BBCode - IRC #ubuntuforums

    Member: Not Canonical Team

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

  6. #6
    Join Date
    Jun 2007
    Location
    Pretoria, South Africa
    Beans
    136
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Take Ownership of Newly Installed Hard Drive

    Quote Originally Posted by coffeecat View Post
    One useful little shortcut that doesn't seem to be well known. If you omit the group name, but leave a trailing colon, as in:

    Code:
    sudo chown -R yourusername: /media/mountpoint
    ... the chown command will apply whichever your default group is. Saves a few keystrokes and it works with chmod too.
    Thanks, that works however when I switch of or reboot the computer I have to go through that whole exercise again. Is there no way that one can change this to a permanent situation/setup.

    Thanks.
    "Some people say if you play a windows cd backwards it plays satanic messages. That's nothing, because if you play it forwards it installs windows!" (Author unknown)

  7. #7
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 15.04 Vivid Vervet

    Re: Take Ownership of Newly Installed Hard Drive

    Quote Originally Posted by JohnPta View Post
    Thanks, that works however when I switch of or reboot the computer I have to go through that whole exercise again. Is there no way that one can change this to a permanent situation/setup.

    Thanks.
    Interesting. It sounds as though the -R (recursive) option may not be affecting the ownership of the root of the filesystem in the external drive - just all the folders and files in it.

    Whenever I want to own a Linux filesystem on an external drive or an internal partition, I run the chown command without the -R switch. Although this might appear to be chowning the mountpoint, it doesn't - it takes ownership of the filesystem itself. And it sticks. So try:

    Code:
    sudo chown yourusername: /media/mountpoint
    Substituting yourusername and mountpoint as appropriate.
    Ubuntu 15.04 Desktop Guide - Ubuntu 14.04 Desktop Guide - Forum Guide to BBCode - IRC #ubuntuforums

    Member: Not Canonical Team

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

  8. #8
    Join Date
    Jun 2009
    Location
    Open Linux Forums
    Beans
    2,710

    Re: Take Ownership of Newly Installed Hard Drive

    Nesxt time try the following, it should be just copy & paste:
    Code:
    sudo chown -R $USER: /media/Samsung
    What filesystem is the drive?
    Last edited by Leppie; September 24th, 2011 at 10:41 PM.
    I'm not antisocial. I'm just not user friendly...
    Open Linux Forums

  9. #9
    Join Date
    Apr 2009
    Location
    none of your business
    Beans
    49
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Take Ownership of Newly Installed Hard Drive

    Um, this may be a stupid suggestion, but why not just start Nautilus as root using gksu and then browse to your hard drive, right click, go to properties and change the permissions from there?
    Code:
    gksu nautilus

  10. #10
    Join Date
    Jun 2007
    Location
    Pretoria, South Africa
    Beans
    136
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Take Ownership of Newly Installed Hard Drive

    Quote Originally Posted by coffeecat View Post
    Interesting. It sounds as though the -R (recursive) option may not be affecting the ownership of the root of the filesystem in the external drive - just all the folders and files in it.

    Whenever I want to own a Linux filesystem on an external drive or an internal partition, I run the chown command without the -R switch. Although this might appear to be chowning the mountpoint, it doesn't - it takes ownership of the filesystem itself. And it sticks. So try:

    Code:
    sudo chown yourusername: /media/mountpoint
    Substituting yourusername and mountpoint as appropriate.
    Yes you are right. When I take the mount point as "/media" it sticks, thanks anyway.
    My wife asks me why I am still fighting with Linux instead of planting roses at my age. Well I told her because it is there and it keeps my brain busy.
    "Some people say if you play a windows cd backwards it plays satanic messages. That's nothing, because if you play it forwards it installs windows!" (Author unknown)

Page 1 of 2 12 LastLast

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
  •