Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2006
    Location
    Berlin, Germany
    Posts
    15

    Mount FAT32 shared partition with 'write' permission


    I have a simple but annoying problem. I want to automatically mount a shared data partition at boot-up in order to read/write data and to share email and web browser information. I have a separate partition formatted to FAT32 (vfat). I have created a mount point (/winshare) and added a line to '/etc/fstab'. For various reasons I would prefer to have an independent mount point rather than mounting it in '/home/user_name' (where I assume I would have read/write access by default). However, while the partition mounts, I can see and access the data, I cannot get write permission.

    Here is the relevant information.
    $ mount:
    Code:
    /dev/sda2 on /winshare type vfat (rw,uid=1000,gid=1000)
    '/etc/fstab':
    Code:
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point>   <type>  	<options>       		<dump>  <pass>
    proc            /proc           proc    	defaults        		0       0
    usbfs		     /proc/bus/usb	usbfs		devmode=0666  	  0	0
    sysfs           /sys            sysfs   	defaults        		0       0
    tmpfs           /dev/shm        tmpfs   	defaults        		0       0
    /dev/sda5       /               reiserfs	defaults        		0       1
    /dev/sda1       /media/sda1     ntfs		ro,umask=000,nls=utf8		0       0
    /dev/sda2       /winshare	vfat		auto,rw,uid=1000,gid=1000 0       0
    /dev/sda6       /home		ext3		defaults        		0       0
    /dev/sda7       none            swap		sw              		0       0
    /dev/hdc        /media/cdrom0   		udf,iso9660 user,noauto		0       
    0OC
    I have tried mounting the partition using <options>:
    "rw,auto,users"
    and
    "defaults"
    as well as what you can see above
    "auto,rw,uid=user_name,gid=group_name"

    I have also tried to run '# chmod' on the mount point, for e.g., '# chmod ug+w /winshare' but while I can change all these options, I cannot change the write permission.

    Can anyone advise me on this? Thanks.

    coady

  2. #2
    Linux Guru antidrugue's Avatar
    Join Date
    Oct 2005
    Location
    Montreal, Canada
    Posts
    3,211
    This should work nicely :
    Code:
    /dev/sda2       /winshare	vfat		user,umask=0000,iocharset=utf8   0    0
    "To express yourself in freedom, you must die to everything of yesterday. From the 'old', you derive security; from the 'new', you gain the flow."

    -Bruce Lee

  3. #3
    SuperMod (Back again) devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,777
    add this code in /etc/fstab file for /winshare.
    Code:
    /dev/sda2      /winshare      vfat     rw,auto,umask=0,uid=1000,gid=1000 0 0

    Edit: antidrugue beats me !



    Casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Oct 2006
    Location
    Berlin, Germany
    Posts
    15
    I tried the following, but it doesn't work:
    Code:
    /dev/sda2 /winshare vfat rw,auto,umask=0000,uid=1000,gid=1000,iocharset=utf8	0       0
    I am not sure why? I have tried other combinations too.
    Is the problem the location of the mount point in the file system?
    What about specific umask settings (e.g. for user and group)?
    Note, utf8 is set in LANG.

    coady

  6. #5
    I believe the important bit is the "user" part.
    Code:
    /dev/sda2 /winshare vfat user,rw,auto,umask=0000,uid=1000,gid=1000,iocharset=utf8	0       0
    This allows users with non-root access to write to the partition. (i think)

  7. #6
    Just Joined!
    Join Date
    Oct 2006
    Location
    Berlin, Germany
    Posts
    15
    I have entered the following setting in '/etc/fstab':
    "/dev/sda2 /media/sda2 vfat exec,umask=000,shortname=mixed,quiet,iocharset=utf 8 0 0"

    command "mount" looks like this:
    "/dev/sda2 on /media/sda2 type vfat (rw,umask=000,shortname=mixed,quiet,iocharset=utf"

    command "ls -l" looks like this:
    "drwxrwxrwx 6 root root 4096 1970-01-01 01:00 sda2"

    It should work. I know it should. But I can't write to "/dev/sda2". The strange thing I noticed here is the date (i.e. "1970-01-01 01:00").

    coady

  8. #7
    Sorry to barge in, but i have the same problem.
    I crated /mnt/dos

    in fstab i added the line

    /dev/hdb5 /mnt/dos vfat defaults 0 0

    or rw 0 0

    what to do? i just want my partition mounted, thats all.

  9. #8
    SuperMod (Back again) devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,777
    hi koady !

    post the output of 'fdisk -l' command.

    Quote Originally Posted by Danniy
    in fstab i added the line
    /dev/hdb5 /mnt/dos vfat defaults 0 0
    or rw 0 0
    what to do? i just want my partition mounted, thats all.
    the code you are using seems correct. is /dev/hda5 has FAT32 file system? did you create mount point 'dos'?
    post the output of 'fdisk -l' command.






    Casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  10. #9
    Just Joined!
    Join Date
    Oct 2006
    Location
    Berlin, Germany
    Posts
    15
    Thanks to everyone who helped here. I now have read/write access to the shared partition. Best regards to all...
    coady

  11. #10
    -->
    What do u mean by creating a mount point? How to create a mount point?

    The partition is fat32. Is a windows partition, and i want full rights on it from linux. I cant mount it.

    I only mount it by this line:

    mount -t vfat /dev/hdb5 /mnt/dos

    But is temporary and i dont have write rights.

    What to do. Im a linux novice.

Posting Permissions

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