Ubuntu – How to change permissions on a FAT32 formatted drive


I am using Microsoft Visual C++ on Windows and Qt Creator on Ubuntu. I can't change permissions on my flash drive (FAT32), even as root.

How can I change permissions on a FAT32 flash-drive?

Best Answer

vfat does not support Linux permissions. You can set permissions manually when you mount the device.

Unmount the flash drive from nautilus, but do not remove it.

sudo mkdir /media/flash
sudo mount /dev/sdb1 /media/flash -o dmask=000,fmask=111

You can possibly work around the issue if you use NTFS on the flash drive, and in that case mount it with the permissions option.

sudo mkdir /media/flash
sudo mount /dev/sdb1 /media/flash -o permissions    

With the permissions option chown and chmod should work.

See man mount

Other options might be to use ext2 on the flash drive (smaller overhead) and the fs-driver on windows