Results 1 to 7 of 7

Thread: changing owner of drive

  1. #1
    Join Date
    Jun 2009
    Location
    Rosetta, South Africa
    Beans
    35
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    changing owner of drive

    I have installed a USB external drive and created 2 partitions. 1 x ntfs and 1 x ext3.
    The ext3 partition (/dev/sdd2) is owned by root. I want it to be owned by 'phil'
    I have searched and found lots of stuff about file permissions but not changing the owner of a drive partition.
    Sorry if this has been covered before but I could not find the solution.
    Thanks

    -------------------
    Thanks to all who replied.
    Got a better understanding of what is going on and got my permissions back
    Last edited by Phil Hansen; October 28th, 2009 at 02:26 PM. Reason: solved

  2. #2
    Join Date
    Jun 2007
    Location
    Oz
    Beans
    501
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: changing owner of drive

    If it's mounted in directory "mount_dir" at /path_to/mount_dir, run this command:
    Code:
    sudo chown phil:phil /path_to/mount_dir
    and it will change ownership to user=phil, group=phil.

    That's for ext3.

    NTFS is different, see here for NTFS: HowTo Mount NTFS Partitions Read Write in Ubuntu & Kubuntu
    Last edited by swerdna; October 28th, 2009 at 11:52 AM.

  3. #3
    Join Date
    Sep 2007
    Beans
    94
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: changing owner of drive

    By the way, as far as I can tell you will be able to change the owner of the drive when it is inserted into your PC. If you insert into a different PC, that PC will mount the USB as owned by root.

  4. #4
    Join Date
    Jun 2009
    Location
    Rosetta, South Africa
    Beans
    35
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: changing owner of drive

    Quote Originally Posted by swerdna View Post
    If it's mounted in directory "mount_dir" at /path_to/mount_dir, run this command:
    Code:
    sudo chown phil:phil /path_to/mount_dir
    and it will change ownership to user=phil, group=phil
    Sorry missing something.
    tried:
    Code:
     sudo chown phil:phil /dev/sdd2
    No change.
    Not sure what you mean by /path_to/mount_dir
    What should go in there.
    Last edited by Phil Hansen; October 28th, 2009 at 01:23 PM. Reason: Getting used to this stuff

  5. #5
    Join Date
    Jan 2007
    Location
    London, UK
    Beans
    3,525
    Distro
    Ubuntu Development Release

    Re: changing owner of drive

    Quote Originally Posted by Phil Hansen View Post
    Sorry missing something.
    tried:
    Code:
     sudo chown phil:phil /dev/sdd2
    No change.
    Not sure what you mean by /path_to/mount_dir
    What should go in there.
    you need to mount your partition first before you can chnage persmissions.

    For example: if your drive is mounted on /media/somedrive then you run following command:
    Code:
    sudo chown -R phil:phil /media/somedrive
    replace somedrive with actual mounted one. if you still cant find it then post output of the following command:
    Code:
    sudo mount
    You came empty handed, that is how you shall leave. Whatever you claim as yours today, belonged to someone else yesterday, will be someone else's tomorrow.

  6. #6
    Join Date
    Sep 2008
    Location
    Algeria
    Beans
    56
    Distro
    Ubuntu Development Release

    Re: changing owner of drive

    Install this Application:

    sudo apt-get install pysdm

    Then go to System-> Administration-> Storage Device Manager. Choose your partition (sdb2 as i think) and Click on assistant button , and check after the 5 first checkbox in the mounting tab click after on OK , and now after you remount the partition , you''l be able to write on it.

  7. #7
    Join Date
    Jun 2007
    Location
    Oz
    Beans
    501
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: changing owner of drive

    Quote Originally Posted by delphiexile View Post
    Install this Application:

    sudo apt-get install pysdm

    Then go to System-> Administration-> Storage Device Manager. Choose your partition (sdb2 as i think) and Click on assistant button , and check after the 5 first checkbox in the mounting tab click after on OK , and now after you remount the partition , you''l be able to write on it.
    Phil Hansen: be wary of this advice. It does not change ownership IIRC.

    And -- regarding this:
    Quote Originally Posted by Phil Hansen View Post
    Sorry missing something.
    tried:
    Code:
     sudo chown phil:phil /dev/sdd2
    No change.
    Not sure what you mean by /path_to/mount_dir
    What should go in there.
    Follow ukripper's advice to discover the mount directory (or just use the command 'df -Th')
    Last edited by swerdna; October 28th, 2009 at 08:15 PM.

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
  •