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

Thread: Storage partition, PERMISSIONS

  1. #1
    Join Date
    Oct 2006
    Beans
    73
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Arrow Storage partition, PERMISSIONS

    All even I've tried to setup proper partitions for my storage partition that will serve my dual boot laptop. The partition is on the same drive I dual boot with. I can't seem to get figure out how to get permission to allow user(with root) to get read/write/execute enabled.

    I only want the user and root to have full permissions on the partition. I don't want others to read/write/execute within it.

    /etc/fstab is

    Code:
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    defaults        0       0
    # /dev/sda2
    UUID=6ccf4b83-d7ad-472d-a32f-3b70e3f74c77 /               ext3    relatime,erro$
    # /dev/sda1
    UUID=857cd650-3fcc-4cf8-8b50-4bbbdaee26a2 none            swap    sw           $
    /dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
    /dev/sda4 /media/Storage ext3 defaults 1 0
    What would be nice is to have a group enabled for both user and root to enable what I want so no one else can see or use/ copy/ paste into it.

    stat /dev/sda4 reads:

    Code:
      File: `/dev/sda4'
      Size: 0         	Blocks: 0          IO Block: 4096   block special file
    Device: eh/14d	Inode: 5868        Links: 1     Device type: 8,4
    Access: (0660/brw-rw----)  Uid: (    0/    root)   Gid: (    0/    root)
    Access: 2009-03-01 16:52:45.581941674 -0500
    Modify: 2009-03-01 16:52:31.704004813 -0500
    Change: 2009-03-01 20:39:54.453941665 -0500
    stat /media/Storage reads:

    Code:
      File: `/media/Storage/'
      Size: 4096      	Blocks: 8          IO Block: 4096   directory
    Device: 804h/2052d	Inode: 2           Links: 4
    Access: (0007/d------rwx)  Uid: (  755/ UNKNOWN)   Gid: ( 1000/  justin)
    Access: 2009-03-01 16:49:15.000000000 -0500
    Modify: 2009-03-01 16:05:32.000000000 -0500
    Change: 2009-03-01 16:49:15.000000000 -0500
    Basically when I formatted the drive, I 'sudo mkdir /dev/sda4 /media/Storage'. Not sure if is messing anything up.

    It's obvious I need help. and all the help I get is much appreciate.

    Thank you in advance.
    Justin

  2. #2
    Join Date
    Oct 2005
    Location
    Jacksonville, FL
    Beans
    29,420

    Re: Storage partition, PERMISSIONS

    First, I would edit /etc/fstab and change the entry for /dev/sda4 from what you have right now to this.

    Code:
    /dev/sda4 /media/Storage ext3 defaults 0 2
    Now, if you want to write to /media/Storage without root privilege, just change the ownership of /media/Storage from root to your login name, assuming your login name is justin.

    Code:
    sudo chown -R justin:justin /media/Storage
    sudo chmod 700 /media/Storage
    ls -la /media
    Now, only user justin and root can read or write to /media/Storage. Nobody else can even take a peak it there.
    In the world of Linux, who needs Windows and Gates...

    Got most of my golden beans at an auction on eBay (with a couple of free drinks).

  3. #3
    Join Date
    Oct 2006
    Beans
    73
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Storage partition, PERMISSIONS

    Quote Originally Posted by taurus View Post
    First, I would edit /etc/fstab and change the entry for /dev/sda4 from what you have right now to this.

    Code:
    /dev/sda4 /media/Storage ext3 defaults 0 2
    Now, if you want to write to /media/Storage without root privilege, just change the ownership of /media/Storage from root to your login name, assuming your login name is justin.

    Code:
    sudo chown -R justin:justin /media/Storage
    sudo chmod 700 /media/Storage
    ls -la /media
    Now, only user justin and root can read or write to /media/Storage. Nobody else can even take a peak it there.
    First off, thank you very much for that. I've been looking to do that same thing all day. And, it was obviously in to those two last numbers you told me to change.

    ls -la /media shows

    Code:
    drwx------  5 justin justin 4096 2009-03-01 22:41 Storage
    For a better explanation, what did the 0 2 do?

    And second, when I create a folders, or files, right click in nautilus, properties, and permissions - the said files don't retain the same permissions as the Storage permission. Does that make sense, and does it matter? Can I change the permissions to be the same as the partition permissions once created, or moved into the partition?

    Thanks very much
    Justin

  4. #4
    Join Date
    Mar 2009
    Beans
    3

    Re: Storage partition, PERMISSIONS

    HI Guys, I'm a new Ubuntu user (one week now and I like it a lot) but I have also a problem with permissions for my FAT32-drive that I share with WindowsXP.
    I managed to mount the disk automatically and changed /etc/fstab. Than I tried the command
    Code:
    sudo chown -R justin:justin /media/Storage
    But I only get messages like 'operation not permitted' for every file on the disk... When using
    Code:
    ls -la /media
    , I see that only root has the right privileges to write

  5. #5
    Join Date
    Mar 2009
    Beans
    3

    Re: Storage partition, PERMISSIONS

    Whoop, and now I don't have permission anymore do view the files, to mount or unmount... How to fix this?

  6. #6
    Join Date
    Oct 2005
    Location
    Jacksonville, FL
    Beans
    29,420

    Re: Storage partition, PERMISSIONS

    Quote Originally Posted by soapwater View Post
    HI Guys, I'm a new Ubuntu user (one week now and I like it a lot) but I have also a problem with permissions for my FAT32-drive that I share with WindowsXP.
    I managed to mount the disk automatically and changed /etc/fstab. Than I tried the command
    Code:
    sudo chown -R justin:justin /media/Storage
    But I only get messages like 'operation not permitted' for every file on the disk... When using
    Code:
    ls -la /media
    , I see that only root has the right privileges to write
    Quote Originally Posted by soapwater View Post
    Whoop, and now I don't have permission anymore do view the files, to mount or unmount... How to fix this?
    How did you mount your fat32/vfat partition through /etc/fstab? Remember, fat32/vfat doesn't play well with permissions/ownership stuff so chmod/chown doesn't do any good.

    Post the output of these commands from a terminal
    Code:
    sudo fdisk -l
    cat /etc/fstab
    df -h
    In the world of Linux, who needs Windows and Gates...

    Got most of my golden beans at an auction on eBay (with a couple of free drinks).

  7. #7
    Join Date
    Oct 2005
    Location
    Jacksonville, FL
    Beans
    29,420

    Re: Storage partition, PERMISSIONS

    Quote Originally Posted by justin_c18 View Post

    Code:
    drwx------  5 justin justin 4096 2009-03-01 22:41 Storage
    Once you've set the permissions for /media/Storage to 700, it doesn't matter what kind of permissions you have for files and directories under it, nobody is able to view them.

    Just log in as another user and see what happens when you run this command from a terminal.

    Code:
    cd /media/Storage
    -or-
    ls -la /media/Storage
    In the world of Linux, who needs Windows and Gates...

    Got most of my golden beans at an auction on eBay (with a couple of free drinks).

  8. #8
    Join Date
    Oct 2006
    Beans
    73
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Storage partition, PERMISSIONS

    I don't like hijacked posts because not only did it not answer all the proceeding questions, but different filesystems are different.

    Write and ask in your own post for more clarity.

  9. #9
    Join Date
    Oct 2006
    Beans
    73
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Arrow Re: Storage partition, PERMISSIONS

    So, now whenever I restart the computer, permissions to the files and folders inside my Storage partition are not correct. My permissions are gone, and I can't edit the folder, or anything inside it.

    How can I fix it so justin and root have permission over the folers and files? I can't go into properties in nautilus and change the permissions, but that's not what I want.

    Thanks.

  10. #10
    Join Date
    Oct 2005
    Location
    Jacksonville, FL
    Beans
    29,420

    Re: Storage partition, PERMISSIONS

    Post the outputs of these commands from a terminal.

    Code:
    sudo fdisk -l
    cat /etc/fstab
    ls -la /media
    df -h
    In the world of Linux, who needs Windows and Gates...

    Got most of my golden beans at an auction on eBay (with a couple of free drinks).

Page 1 of 2 12 LastLast

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
  •