Results 1 to 8 of 8

Thread: [SOLVED] Partition permissions

  1. #1
    Join Date
    Dec 2006
    Beans
    145
    Distro
    Ubuntu 10.04 Lucid Lynx

    [SOLVED] Partition permissions

    When I installed Ubuntu I created an extra partition (which I called 'data'). I would now like to use it to store some files but don't have the required permissions - owner and group are both 'root'.
    Having had a rather frightening experience recently when, using the terminal, I managed to change the permissions in one of my directories to 'unrecognised permissions' (thankfully I eventually managed to correct it), I don't want the same thing to happen to a whole partition.
    Could someone walk me through the exact process I need to go through so that I can easily access this partition without being root?

  2. #2
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Partition permissions

    Removing post as I misidentified the request. See vandium's post below.
    Last edited by drs305; June 15th, 2008 at 06:03 PM. Reason: added blkid

  3. #3
    Join Date
    Dec 2006
    Beans
    145
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Partition permissions

    It's mounted OK - I can see it in Nautilus (between CDrom and dev) - I just need to know how to change the permissions so that I don't need to be root to access it.

  4. #4
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Partition permissions

    Quote Originally Posted by Man_Beach View Post
    It's mounted OK - I can see it in Nautilus (between CDrom and dev) - I just need to know how to change the permissions so that I don't need to be root to access it.
    I'm removing the post as I misinterpreted what the OP wanted. See vanadium's post below for the solution.
    Last edited by drs305; June 15th, 2008 at 06:02 PM.

  5. #5
    Join Date
    Apr 2007
    Beans
    2,578
    Distro
    Ubuntu

    Re: Partition permissions

    As root, create a directory on the extra partition, then make yourself the owner of that directory. Place a link to that directory in your home directory for easy access.

    Command line:

    sudo mkdir /media/data/mydata
    sudo chown $USER:$USER /media/data/mydata
    ln -s /media/data/mydata data

    (don't even need to be root for the last command)

    Graphical approach: load nautilus with root permissions

    gksudo nautilus

    1) Create the directory mydata 2) Change its ownership (right-click - permissions tab) 3) Create the link (right-click - Make Link; this creates a link named "Link to mydata". Move that to your own home directory and change the name to "data" or any name you like).

  6. #6
    Join Date
    Aug 2005
    Location
    Philadelphia, PA, USA
    Beans
    2,774
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: Partition permissions

    I have had this problem also. All I do is run

    "sudo chown -R tom:users /data"

    The -R switch is for recursive; i.e., all subdirectories within /data will be owned by you as well. My username is tom. Substitute your username for tom in the command above.
    Registered Linux User #422464 http://linuxcounter.net/
    Use the search engine that respects your privacy rights: https://startpage.com/

  7. #7
    Join Date
    Apr 2007
    Beans
    2,578
    Distro
    Ubuntu

    Re: Partition permissions

    This will work, but is an inflexible solution if you have more than one user on the system.

  8. #8
    Join Date
    Dec 2006
    Beans
    145
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Partition permissions

    Nice and simple and well explained. Thank you both, tommcd and vanadium.

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
  •