Home » Questions » Computers [ Ask a new question ]

Read and write permission for FAT32 partition in Ubuntu

Read and write permission for FAT32 partition in Ubuntu

This is a strange problem: I dual boot Win7 (sda2) and Ubuntu (sda3) and wanted to use the FAT32 partition to share files across two OS' with the following partition table

Asked by: Guest | Views: 435
Total answers/comments: 4
Guest [Entry]

"Have you tried writing to the files with a sudo command? That should work with your current setup.

To get file writes for your normal user working, you need to use the uid and gid options to mount, to set the owner of files on the partition to your current userID. You probably also want either umask or dmask and fmask options.

Your mount command would look like this:

sudo mount -t vfat /dev/sda6 /media/FAT32 -o uid=1000,gid=1000,umask=022
# assuming your user's UID is 1000, GID is 1000
# umask=022 sets permission mode 755 for all files on the partition"
Guest [Entry]

"You have the wrong order on the commands you want:

sudo mkdir /media/FAT32
sudo mount /dev/sda6 /media/FAT32
sudo chmod 777 /media/FAT32

What is happening is that /media/FAT32 represents different directories before and after the mount. Before it's the directory you made, and which you chmod'ed 777. After, it's the root directory of the filesystem in /dev/sda6."
Guest [Entry]

"I had exactly the same problem and the only thing that actually worked is:

sudo mount -t vfat /dev/sda6 /media/FAT32 -o rw,umask=0000

See also that answer"
Guest [Entry]

"Without manually mounting, a fstab line does the trick:

UUID=1DD9-0D44 /media/exthd/TERABYTE_G vfat rw,noatime,uid=1000,gid=1000,user 0 0

uid,gid are of your user; /media/exthd/TERABYTE_G must be pre-created
If mount -a isn't applying properly to the new fstab line, reboot to resolve"