Mounting External hard drive

Asked by Leona

My question is.
Would it be possible for Ubuntu to automatically mount an external hard drive as the logged in user.

I have had problems with a new external drive, I was unable to write to it, after formatting it to EXT3. I found that only ROOT could mount, read and write to it. I did search and find the answer, but I do not think this is a suitable solution for ordinary users.

I would not expect users to know about root or have to edit fstab or change permissions, just to be able to access a external drive, this is not sensible.

So what I propose is a change to how usb / external drives are mounted. Instead of defaulting to mounting as Root, mount them as the user who is logged in at the time the drive is detected. thus making the drive accessible straight away, no fiddling around in the terminal.

Is that possible? it would make a lot of people happier and reduce the problems of connecting External Drives.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
mycae (mycae) said :
#1

>Instead of defaulting to mounting as Root, mount them as the user who is logged in at the time the >drive is detected. thus making the drive accessible straight away,

This is the default behaviour.

However, ext drives have an added complication that is implicit in the filesystem -- the numerical user ID of the user must match when moving between machines. As you move between machines this can be mixed around; you may have to set world read permissions on any files/folders that you want to be read as you would on a vfat thumbdrive.

Revision history for this message
Leona (leona-devon) said :
#2

but this is not what I (or others) are experiencing, when I plug in my drive, it mounts as 'root'. When it creates the directory in /media it creates it as root, not as the user. So we have to enter the terminal, edit fstab, create the directory manually and set its permissions, a non linux user wouldn't know or understand how or way they had to do this.

I think I understand what you are saying though, if it was used on multiple systems with multiple users there would be a mix of user and group id's, which the host system may not understand.

So to counter this, could the drive not be treated like a 'shared' device, allowing global read/write? Or allowing this kind of thing to be set via the GUI (maybe a prompt when drive connected?) interface?

Can you help with this problem?

Provide an answer of your own, or ask Leona for more information if necessary.

To post a message you must log in.