Web lists-archives.com

Re: USB external hard drive -- mounting




On 29/08/17 12:19, James H. H. Lampert wrote:
First, I was able to relabel the drive as a suitably generic "ExternalHD," and when I unplugged it and plugged it back in, it mounted (albeit still under a user-specific, auto-created mount point) as that label. With the drive automounted, I did a "umount" on it, created a mount point for it (directly in /media, and available to everybody, for now, at least), and then did a "mount" at the new mount point. It mounted successfully in that user-neutral location, and is available to any signed-on user.

Permissions are likely to be main problem for multiuser access. User-private groups, the sgid bit, and careful selection of umask may help.

Of course, if I then unmount it, pull the plug, and plug it back in, without an fstab entry, it auto-mounts to a created mount point in the user's subdirectory of /media, but at least the mount point I created doesn't go bye-bye, so that's a start.

Good. This is the expected behaviour for media with labels.

I have not tried this but a udev rule might be your next step:
https://www.axllent.org/docs/view/auto-mounting-usb-storage/

There is also a thing called udisks, but I have not used that either.

Kind regards,

--
Ben Caradoc-Davies <ben@xxxxxxxxxxxx>
Director
Transient Software Limited <http://transient.nz/>
New Zealand