I have a 16 GB flash drive formatted as FAT. When I plug the flash drive into my Dell Laptop running Ubuntu 14.04, I can read and write with no problem, but when I plug the same flash drive into my Dell Tower running Ubuntu 16.04, it sets up as read only. Below are results for report file system disk space usage (df -Th
) and list directory contents showing permissions (ls -la
) at each location. I am logged in as user at both locations.
Why are the permissions showing up different at each location? What can I do to set the flash drive to read and write on the Dell Tower running Ubuntu 16.04?
I have tried sudo chmod 666 /dev/sdc1
but that has no effect on permissions. I have also tried sudo chmod 666 /media/user/EBC2-93C8
same thing.
Dell Laptop Ubuntu 14.04
$ df -Th
/dev/sdb1 vfat 16G 72K 16G 1% /media/user/EBC2-93C8
$ ls -la /media/user
drwx------ 3 user user 8192 Jan 16 16:09 EBC2-93C8
Dell Tower Ubuntu 16.04
$ df -Th
/dev/sdc1 vfat 16G 80K 16G 1% /media/user/EBC2-93C8
$ ls -la /media/user
drwxr-xr-x 3 user user 8192 Dec 31 1969 EBC2-93C8
I tried the solution posted at
How do I change permissions on a FAT32 formatted drive?
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
It did not work right away. I had to unplug the flash drive and plug it in again. Now it works! Will this fix persist even after I reboot?
Thanks!
Follow-up notes......
the media directory now has two sub directories: user and flash.
after I rebooted the Dell Tower Ubuntu 16.04 machine and plugged in the flash drive, it appeared in the user folder.
but it appears read/write privileges have returned.
sudo fdisk -l
Disk /dev/sdc: 15.1 GiB, 16225665024 bytes, 31690752 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x9c767207
Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 5968 31690751 31684784 15.1G c W95 FAT32 (LBA)
df -Th
/dev/sdc1 vfat 16G 152K 16G 1% /media/user/EBC2-93C8
ls -la
total 16
drwxr-x---+ 3 root root 4096 Jan 16 17:39 .
drwxr-xr-x 4 root root 4096 Jan 16 17:20 ..
drwxr-xr-x 3 user user 8192 Jan 16 17:43 EBC2-93C8
what's the little plus sign doing there?
also, I tried several variations of chmod.
sudo chmod 666 /dev/sdc1
sudo chmod 600 /dev/sdc1
sudo chmod 666 /media/user/EBC2-93C8
sudo chmod 600 /media/user/EBC2-93C8
none seem to work. oh well.
id -u; id -g
,ls -lan "/media/$USER"
, andcat /proc/mounts
on both systems with the removable storage device connected and mounted? Thanks. – David Foerster Jan 17 '18 at 09:25/proc/mounts
refer to the file system in question, I'm happy for the pre-filtering. :-) – David Foerster Jan 18 '18 at 03:20