[lucid] how to mount USB storage with correct permissions?

Reinhold Rumberger rrumberger at web.de
Fri Oct 29 00:42:17 UTC 2010


On Friday 29 October 2010, D. R. Evans wrote:
> Reinhold Rumberger said the following at 10/27/2010 11:42 PM :
> >> But the drives are marked as being owned by root, so I can't
> >> write to them.
> > 
> > Actually, that's not true - they should be owned by user root
> > and group disk. Then, any user in the disk group can write to
> > them.
> 
> I'm sorry, but it *is* true:

Actually, I was talking about the device files. Having directories in 
/media means the USB drives are being mounted. If the directory isn't 
owned by your user, either the filesystem is native and owned by root 
(you didn't elaborate on this part, BTW), or it's been mounted by 
root (use the mount command to check). Do you have some strange 
automounter installed?

> >> I tried changing the permissions on /dev/usb and /dev/usb0,

I take it you actually meant /media/usb and /media/usb0, right?

> > What are those two supposed to be? They don't even exist here.
> 
> Well, they exist here, and that's what Kubuntu calls my drives
> (don't ask me why; I have no idea where it gets those names
> from). When I put a USB stick into the socket, the device
> notifier tells me that there's a new device in /media/usb.

No it doesn't. That's a directory, as per your ls output. Also, my 
device notifier only mentions the file system's name, not the 
directory in media or the device file.

> And,
> as I show above, that device is owned by root.

I wish you'd actually check the device file - although I suspect that 
it's fine.

> >> but as
> >> soon as a drive is actually mounted, the permissions change
> >> back so that only root is allowed to write to the drive.
> > 
> > Are they, perhaps, links to the actual device files? If so, the
> > permissions of the links are without consequence.
> 
> I don't know what the actual device files are.

You can check the output of either mount or df to link the 
directories in media to the device files.

> >> What do I have to do so that when I insert a USB drive into a
> >> USB port I can, as an ordinary user, both read and write to
> >> the drive.
> > 
> > Usually just make sure the user is in the disk group. (In the
> > user management module in system settings, make sure the user
> > has the "Access external storage devices automatically"
> > privileges checked.)
> 
> That is checked.

Seeing as how you problem is with the initial mounting, this wouldn't 
be the cause.
My guess is still some (malconfigured) automounter or strange entries 
in /etc/fstab (much less likely, but still a possibility).

  --Reinhold




More information about the kubuntu-users mailing list