Results 1 to 7 of 7

Thread: Changing owner of USB

  1. #1
    Join Date
    Apr 2007
    Location
    Ottawa ON Canada
    Beans
    196
    Distro
    Lubuntu 18.04 Bionic Beaver

    Arrow [Solved] Changing owner of USB

    This is a silly problem but I have not been able to find a solution.

    I have a USB Flash device that I reformatted using Gparted as ext3. The reformat was successful and the device works fine, the only problem is that the owner is "root" and I can only write to it by logging in as root. I would like to change the ownership and have been though Gparted, Policy Kit and the forums here and haven't found a way to do that.

    Any help is appreciated.
    Last edited by Ahunt; March 30th, 2009 at 02:34 PM. Reason: changed to "solved"

  2. #2
    Join Date
    Mar 2008
    Location
    Connecticut
    Beans
    940
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Changing owner of USB

    Quote Originally Posted by Ahunt View Post
    This is a silly problem but I have not been able to find a solution.

    I have a USB Flash device that I reformatted using Gparted as ext3. The reformat was successful and the device works fine, the only problem is that the owner is "root" and I can only write to it by logging in as root. I would like to change the ownership and have been though Gparted, Policy Kit and the forums here and haven't found a way to do that.

    Any help is appreciated.

    Change the ownership of the mount point

    Code:
    chown USER:USER /path/to/mount/point
    Substitute your user name for USER. If you have subdirectories, you might need to use the -R flag with the chown.

    Bill
    Ubuntu 10.04-Server: HP Pavilion: AMD Athlon 3200; 2gb RAM; GeForce4 MX - nForce; 160gb HDD; 1TB eSATA External HDD | Ubuntu 10.04: Dell D600; Intel Pentium M 1600 MHz; 2gb RAM; ATI Radeon 9000 (RV250); 60gb HD | Ubuntu User #24614

  3. #3
    Join Date
    Apr 2007
    Location
    Ottawa ON Canada
    Beans
    196
    Distro
    Lubuntu 18.04 Bionic Beaver

    Re: Changing owner of USB

    Thanks for your reply. That makes sense but I am just getting errors, so I think I am not following your instructions correctly.

    The user's ID is "ruth" and the device is called "Ruth 15GM Flash"

    Here is what I typed:

    $ chown RUTH:RUTH /media?"Ruth 15GB Flash"

    and it returned:

    chown: invalid user

    I tried several variations, capitalization etc with no success. Can you perhaps give me the exact command from the info above? Thank you.

  4. #4
    Join Date
    Mar 2008
    Location
    Connecticut
    Beans
    940
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Changing owner of USB

    Quote Originally Posted by Ahunt View Post
    Thanks for your reply. That makes sense but I am just getting errors, so I think I am not following your instructions correctly.

    The user's ID is "ruth" and the device is called "Ruth 15GM Flash"

    Here is what I typed:

    $ chown RUTH:RUTH /media?"Ruth 15GB Flash"

    and it returned:

    chown: invalid user

    I tried several variations, capitalization etc with no success. Can you perhaps give me the exact command from the info above? Thank you.

    ruth:ruth -- usernames are not uppper case; sorry for the confusion.

    Bill
    Ubuntu 10.04-Server: HP Pavilion: AMD Athlon 3200; 2gb RAM; GeForce4 MX - nForce; 160gb HDD; 1TB eSATA External HDD | Ubuntu 10.04: Dell D600; Intel Pentium M 1600 MHz; 2gb RAM; ATI Radeon 9000 (RV250); 60gb HD | Ubuntu User #24614

  5. #5
    Join Date
    Apr 2007
    Location
    Ottawa ON Canada
    Beans
    196
    Distro
    Lubuntu 18.04 Bionic Beaver

    Re: Changing owner of USB

    Thanks you for that - that was about the only variation I missed!

    So I typed in:

    $ chown ruth:ruth /media/"Ruth 15 GB Flash"

    and it returned:

    chown: changing ownership of '/media/Ruth 15GB Flash': Operation not permitted.

    Because "root" is the owner should this have been a sudo chown instead?

  6. #6
    Join Date
    Nov 2006
    Location
    Norway
    Beans
    795
    Distro
    Kubuntu 10.04 Lucid Lynx

    Re: Changing owner of USB

    Yes, just use
    Code:
    sudo chown...
    Open mind, open source!
    Keep control of computer usage with timekpr
    Screensaver for Amarok? AmarokScreenSaver
    My (Norwegian) blog about motorcycles and MotoGP

  7. #7
    Join Date
    Apr 2007
    Location
    Ottawa ON Canada
    Beans
    196
    Distro
    Lubuntu 18.04 Bionic Beaver

    Smile [Solved] Re: Changing owner of USB

    That worked! However it left the folders and files on the drive as still belonging to "root", so I ran it again like this:

    $sudo chown -R ruth:ruth /media/"Ruth 15 GB Flash"

    and that recursively changed the ownership of all the files on the drive.

    Thanks so much to both of you for this!
    Last edited by Ahunt; March 30th, 2009 at 02:33 PM. Reason: added "solved"

Tags for this Thread

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
  •