I have two usb drives. Both are Western Digital. One is maybe a couple years older than the other. The older uses USB 2 and is 300 GB while the newer one uses USB 3 and is 500 GB.
The thing I'm trying to understand is why they would automount with different permissions and ownerships. They are both formatted as a single partition with ext3fs. fdisk -l says:
Code:
Device Boot Start End Blocks Id System
/dev/sdb1 1 60798 488352768 83 Linux
for the newer one and
Code:
Device Boot Start End Blocks Id System
/dev/sdc1 1 38914 312569856 83 Linux
for the older one.
Aside from the UUID, the fstab entries for the two are identical:
Code:
UUID=91ea837a-e675-4989-bc8c-0efeff31486a /media/disk1 auto noauto,user,noexec 0 0
UUID=936bcef4-7817-4911-a9e4-8f1cdc257a1b /media/disk2 auto noauto,user,noexec 0 0
where disk1 is the older disk.
Without neither one mounted, ls /media/* -ld reports:
Code:
drwxr-xr-x 2 root root 4096 Jan 16 2011 /media/disk1/
drwxr-xr-x 2 root root 4096 Aug 3 21:03 /media/disk2/
Then if I plug them in it says:
Code:
drwxr-xr-x 33 fred fred 4096 Aug 2 17:27 /media/disk1/
drwxrwxrwx 4 root root 4096 Aug 3 15:05 /media/disk2/
If I unmount them and mount them both with the mount command with username fred then the same thing happens.
If I switch the directories in the fstab file to:
Code:
UUID=91ea837a-e675-4989-bc8c-0efeff31486a /media/disk2 auto noauto,user,noexec 0 0
UUID=936bcef4-7817-4911-a9e4-8f1cdc257a1b /media/disk1 auto noauto,user,noexec 0 0
i.e., just reverse the names of the directories, then the same thing happens. The difference in permissions still exists, and with the directory names reversed,. So it seems that the permissions and user are dependent on what kind of disk it is:
Code:
drwxr-xr-x 33 fred fred 4096 Aug 2 17:27 /media/disk2
drwxrwxrwx 4 root root 4096 Aug 3 15:05 /media/disk1
I'm curious if anyone can explain what's going on and what the better way to go about configuring the mounting of these disks is.