Find the answer to your Linux question:
Results 1 to 8 of 8
Arrrrggjhhhh! Sometimes Linux just make you want to throw the PC out of the window, and get a new one with WINDOWS on it!!! Here is the relevant part of ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2007
    Posts
    61

    Angry [SOLVED] Editing fstab to allow RW access for all users to a NTFS partition


    Arrrrggjhhhh!

    Sometimes Linux just make you want to throw the PC out of the window, and get a
    new one with WINDOWS on it!!!


    Here is the relevant part of my fstab (I think!):
    Code:
    /dev/disk/by-id/ata-Maxtor_7L300S0_L60LCJ0G-part1 /windows/D           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=en_GB.UTF-8 0 0
    1. Why is this labelled "D", when it is "C"
    2. fmask=133
    3. dmask=022
    4. user,gid=users


    Having only just "got" the idea that there are a nunber of ways of issuing chmod, I now find that there is yet another when in the fstab file. It is an easygoogle to find out a workaround to make this drive RW, but doing that way one does not learn what is actually happening.
    how do I find out UID and GID?
    fmask and dmask, how do I find out what the current settings mean, and what they should be to allow RW access for various groups/users or for everyone?

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Set umask=0 and remove UID and GID. umask=0 will allow read/write access to all users.
    Code:
    /dev/disk/by-id/ata-Maxtor_7L300S0_L60LCJ0G-part1 /windows/D           ntfs-3g   defaults,umask=0  0 0
    # Why is this labelled "D", when it is "C"
    Its just a mount point (folder) and you can create/use new mount point anytime.
    Code:
    su -
    mkdir /windows/C
    Replace D with C in /etc/fstab file.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined!
    Join Date
    Nov 2007
    Posts
    61
    Thank-you Casper, for your quick reply to my ill-tempered enqiry this morning.

    I should perhaps have included the rest of the fstab, I have already a partition which mounts itself at /windows/C, this is an unused FAT32 put there when I was trying to install:

    Code:
    /dev/disk/by-id/ata-ST3120022A_5JT3CL13-part5 swap                 swap       defaults              0 0
    /dev/disk/by-id/ata-ST3120022A_5JT3CL13-part6 /                    ext3       acl,user_xattr        1 1
    /dev/disk/by-id/ata-ST3120022A_5JT3CL13-part7 /home                ext3       acl,user_xattr        1 2
    /dev/disk/by-id/ata-ST3120022A_5JT3CL13-part2 /windows/C           vfat       users,gid=users,umask=0002,utf8=true 0 0
    /dev/disk/by-id/ata-Maxtor_7L300S0_L60LCJ0G-part1 /windows/D           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=en_GB.UTF-8 0 0
    proc                 /proc                proc       defaults              0 0
    sysfs                /sys                 sysfs      noauto                0 0
    debugfs              /sys/kernel/debug    debugfs    noauto                0 0
    usbfs                /proc/bus/usb        usbfs      noauto                0 0
    devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
    If I just delete this partition, would fstab auto-update on next boot? If so I could then, I suppose, edit the fstab manually as you suggest above, so that my Windows mounts itself as C, or even, I guess it might do it automagically as it would then be the the first windows partition?

  4. $spacer_open
    $spacer_close
  5. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    As I mentioned earlier, you can use any mount point any time. Mount points are not hard code.
    Just swap /windows/c and /windows/d in /etc/fstab file. NTFS partition will be mounted at /windows/C and Fat32 at /winodws/D on next reboot.
    Code:
    /dev/disk/by-id/ata-ST3120022A_5JT3CL13-part2 /windows/D   vfat  defaults,umask=0  0  0
    /dev/disk/by-id/ata-Maxtor_7L300S0_L60LCJ0G-part1 /windows/C  ntfs-3g defaults,umask=0  0  0
    If I just delete this partition, would fstab auto-update on next boot?
    No. You have to edit /etc/fstab file manually. First of all, swap /windows/C and /windows/D.
    If you are planing to remove FAT32 partition, put # sign before its mount line in /etc/fstab file.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  6. #5
    Just Joined!
    Join Date
    Nov 2007
    Posts
    61
    Ok, thanks again. One more thing....
    Also in /etc/ is a file named fstab-ntfs-config-save, its content is exactly the same as /etc/fstab
    Which should I modify? Or both?

  7. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Modify /etc/fstab file only.
    Other file is used by ntfs-config tool only. As we are editing main file, /etc/fstab manually, there is no need to edit other file.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  8. #7
    Just Joined!
    Join Date
    Nov 2007
    Posts
    61
    Thank-you sir! I have followed your instructions, and done a bit more research on fmask dmask umask etc, I feel that I have learnt a good deal today! My Windows drive is now rw but not x, and is mounted at /Windows/C

    Prepare for more silly noob questions in the days to come...........

  9. #8
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Glad to help you !
    Prepare for more silly noob questions in the days to come...........
    haha... I was a newbie once. Just post questions and we will try our best you guide you.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

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