On 12/31/13 12:03, Bruce Hill wrote:

[snip]

The blkid output would have shown this device, it's UUID, and filesystem.

At any rate, for my flash drives I want them mounted with perms for rw for
user mingdao, so I put something like this in /etc/fstab:

baruch ~ # blkid /dev/sdc1
/dev/sdc1: LABEL="AMD" UUID="CA00-9136" TYPE="vfat"
baruch ~ # grep CA00-9136 /etc/fstab
UUID=CA00-9136                                  /AMD    vfat    
noauto,users,rw,gid=1000,dmask=0002,fmask=0113  0 0

Different for NTFS, of course. And btw, I don't automount anything anything
that is plugged in. Just my preference.

As Alan mentioned, "man mount" would be a good read; as well as "man fstab".
And, did I give you a link to an article on file permissions?

The difference between user and users mean simply that with "user" only the
user who mounted the device can unmount it; with "users" any user can unmount
it, not just the user who mounted it.

Cheers,
Bruce

Thanks for the input.
In my case "blkid" is not showing any LABEL

It depends on what USB I insert:

#blkid /dev/sdb1
/dev/sdb1: UUID="2f5fc53e-4f4c-4e74-b9c4-fca316b47fea" TYPE="ext2"

#blkid /dev/sdb1: UUID="3136-3934" TYPE="vfat"

so it would be hard to specify UUID in fstab for each momory card I insert.
In the past the line in fstab:
/dev/sdb1               /media/stick    auto            noauto,rw,users        
0  0

mounted both "ext2" and "vfat" USB as /media/stick so it is easier to reference 
to it in scripts.
But after recent update if I have this line in fstab the "ext2" USB is mounted as joseph:users but "vfat" USB is mounted as "root:root" If I remove the mounting line from fstab they mount with correct permission "joseph:users" but the mount point is reference as UUID and it makes it hard to reference it in bash scripts.
--
Joseph

Reply via email to