Filesystem Ownership

D. Michael McIntyre michael.mcintyre at rosegardenmusic.com
Wed Jul 4 01:45:03 UTC 2007


On Tuesday 03 July 2007, Laurent Asorne wrote:

> Hi! I'd like to change the ownership of my Sony Microvault 1GB USB Memory
> Stick, but everytime I try with
> # sudo chown laurent:users /media/MICROVAULT/

I assume the stick is formatted with FAT32, and you're using the VFAT 
filesystem on it.  VFAT doesn't have proper permissions, so you have to set 
any permissions at mount time, with mount parameters.

Lets' see...  I plugged a memory card into my computer, and wound up with:


/dev/sdb1 on /media/disk type vfat 
(rw,noexec,nosuid,nodev,noatime,uid=1000,utf8,shortname=lower)

This happened by magic.  I'm not sure what is responsible for mounting it with 
these specific parameters, but I think it's udev.

Looks like this is set up here:

/etc/udev/rules.d/40-permissions.rules

But if you change this at the system level, it will affect any card you mount.  
I don't think there is any off the shelf way to have just one particular 
removable USB storage device come up with different permissions from all the 
rest of them automatically.

You could try to cut something into the udev system to do your custom job.  I 
did that with hotplug once.  However, the more sensible thing in your case is 
probably for you to mount the device by hand, with the parameters of your 
choosing.  Something like...

Well, no, I'm afraid I'm just too tired to dig through the manpage and try to 
come up with the syntax for you.
-- 
D. Michael McIntyre 




More information about the kubuntu-users mailing list