Automatically mount USBs with write permission

Asked by znbhckcs

Hi
Is there a way for Ubuntu to automatically mount all usb flash drives with write permissions?

Thanks

Question information

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

sure I personally add them in /etc/fstab so they mount as I ant, not how some process wants. You could also manually mount it with better options.

if yuo run:

sudo fdisk -l

you will see the partition (you do not mount disks, its impossible. You only mount the partition(s) on the disk)

You can mount to anywhere in your file system you wish (the default is in /media but you can be creative, just dont mount to anywhere in /proc as that will disrupt the running system pretty badly)

make an empty folder: lets say: /media/usb1. and lets assume the partition is /dev/sdb1 (yours may be different, note fdisk output earlier)

Then you can run the command

sudo mkdir /media/usb1; sudo mount /dev/sdb1 /media/usb1 -o uid=1000,rw,user

should do it. If no one has a more graceful answer, I'd use that.

Revision history for this message
znbhckcs (znbhckcs) said :
#2

Could you please explain how this can be done by modifying /etc/fstab ?
I mean, what to write in there if I want all usb's that plug in to the computer to automatically mount and be writable.

Thanks again

Revision history for this message
Isak Frants (isakfrants) said :
#3

It should mount as writable :O Otherwise something is wrong.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

There is no single thing to write in fstab. It varys wildly. If you need a guide this is pretty good:

https://help.ubuntu.com/community/Fstab

But they should be mounting as writable (I don't use automount personally, i see it as a loss of control)

Can you help with this problem?

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

To post a message you must log in.