I’ve been having trouble with getting a 2TB Fat32 formatted USB drive to work nicely in Ubuntu 24.04.1
I’m very new to Linux and have only gotten this far by reading old message boards and tutorials, but here’s where I’m at with it.
I created a .rules file named 90-usb-disks.rules
It lives in /etc/udev/rules.d
Inside it says:
/# UDEV Rules to change the permission of USB disks
KERNEL==“sd*[0-9]”, ATTR{removable}==“1”, ENV{ID_BUS}==“usb”, MODE=“0022”
Now this works… for my user. I have ownership of any USB storage device as soon as I plug it in. I can rwx, but my group (with the same name as my user) can only read.
Trying to change access from the Nautilus permissions pane just starts an endless progress bar that never passes “preparing” as it asks for my password every 90 seconds.
There must be a way to edit this to allow the group to allow rwx access as well, but I just copy/pasted this solution from a forum, I have no idea what those settings actually mean. Please help; thanks in advance :)
There is no need to add a udev rule to make the device writeble by your user. If you have a full Ubuntu setup the external drive should appear in Nautilus as soon as you attach it and it can be mounted and umounted from UI.
if it doesn’t work you can add a line te /etc/fstab like
/dev/sdb1 /mnt/mydisk noauto,user,uid=yourname 0 0
duble check the man page for the right sintax (I’m going by memory), but what you are saying here is that any user can mount this device which shouldn’t be mount automatically on boot, and files there are owned by the user “yourname” The issue with this approach is that the device name changes depending on what you have connected, Udev should also add some symlink which contains the device ID so it is more stable.
*syntax
(Just an FYI, I’m guessing autoincorrect got you).
Great notes too, good point about the device name vs device ID.
From what I understand this is a problem with FAT32 formatted drives specifically since it doesn’t use the Linux file system. Reformatting is not an option at the moment.
What this does is give my user ownership when you plug in a usb device, which allows rw.
I have it set up to mount on startup, but it mounts to root ownership. Now, I remount it and the owner becomes my user.
I honestly can’t remember what I did to make it happen, but it always mounts to /mnt/drivename
I’m using this for a Jellyfin server. Before I added this rule, I couldn’t add folders past the drive itself as a library, so I see this as progress. I just want to edit meta data now.
MODE=0022
sounds like user perms are different from group and other.0022
in octal perms corresponds tou=rwx
,g=rx
,o=rx
.I don’t know if udev “MODE” is the relevant thing here but you could try 0002 so the user part and group part are the same.