Find the answer to your Linux question:
Results 1 to 6 of 6
Hi! I have a 200Gb seagate drive set as a slave in my PC (running Ubuntu 5.10, BTW), and I can only write to that disk if I'm logged in ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2005
    Posts
    71

    How do I change the permissions of a hard disk?


    Hi!

    I have a 200Gb seagate drive set as a slave in my PC (running Ubuntu 5.10, BTW), and I can only write to that disk if I'm logged in as root. If I try to change the permissions as root, nothing happens. I just put up with it for quite a while but it's getting irritating now....
    can anyone help?

    TiA

    Martin

  2. #2
    Linux Guru AlexK's Avatar
    Join Date
    Feb 2005
    Location
    Earth
    Posts
    3,379
    what file-system is that disk formatted as?
    Life is complex, it has a real part and an imaginary part.

  3. #3
    Linux User
    Join Date
    Feb 2006
    Posts
    484
    You must put one more option in the /etc/fstab file to the device line.
    for example:
    one line in the fstab
    {device} {mount point} {fs type} {options} {dump} {pass}

    write a new extra option to the options section like:
    opt1,opt2,..,optn,umask=0xxx where xxx the inverse permission bitmask

  4. #4
    Just Joined!
    Join Date
    May 2005
    Posts
    71
    Sorry, I should have provided more info: The disk is formatted as FAT32, and the mount point is set as /mnt/Storage. my /etc/fstab currently looks like this:

    Code:
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    defaults        0       0
    /dev/hda2       /               ext3    defaults,errors=remount-ro 0       1
    /dev/hda5       none            swap    sw              0       0
    /dev/hdc        /media/cdrom0   udf,iso9660 user,noauto     0       0
    /dev/hdd        /media/cdrom1   udf,iso9660 user,noauto     0       0
    /dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0
    /dev/hdb1   /mnt/Storage  vfat    defaults     0 0
    DO I need to add something to that last line?

    Thanks again,

    Martin

  5. #5
    Linux User
    Join Date
    Feb 2006
    Posts
    484
    I see u use the whole disk in one partition, i think it isn't a good idea.
    but here the fstab line

    /dev/hdb1 /mnt/Storage vfat defaults,gid=disk,umask=0xxx 0 0

    octal bitmask for umask for example:
    everyone read only : 0222
    everzone read write : 0000
    use man umask
    and put the users to the disk group

    have fun!

  6. #6
    Just Joined!
    Join Date
    May 2005
    Posts
    71
    Yeah that works good now. Thank you so much!!

    BTW

    Quote Originally Posted by iwanabeguru
    I see u use the whole disk in one partition, i think it isn't a good idea.
    I know its not Ideal, but I have another drive in there (one thats not listed in //etc/fstab), thats holds an exact copy of my linux/windows partions, should anything go wrong. I'm still relatively new to this, so I'll probably re-partition when I get a better feel for linux.

    Thanks again!!

    Martin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •