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 :)
FAT32 doesn’t support unix file permission, so when you mount the disk linux has to assign a default ownership which usually is to root. And this is the issue you are facing.
You confused the disk permission with the filesystem permission. The udev rule you wrote gives you permission to write the disk (in other words, you can format it or rewrite the whole content) but doesn’t give you permission on the files stored inside because they are on a higher abstraction level.
If you use this computer in interactive mode (in other words if you usually sit in front of it and plug the disk on demand) my suggestion is to remove that line in /etc/fstab and let the ubuntu desktop environment mounting the external hard drive for the current logged in user.
If you use this computer as a server with the USB disk always connected (likely since you mention Jellyfin) you need to modify the fstab line to specify which user should get permission on the files written on the disk.
You can see the full list of options at https://www.kernel.org/doc/Documentation/filesystems/vfat.txt
You either want
uid=Mongostein
(assuming that’s your username on your computer too) to assign to yourself the ownership of all the files, orumask=000
to give everyone all the permissions to the files and directories while ownership will remain to root. You should prefer the second option if jellifin runs as a different user, while the first one is better if there are other users on your computer which shouldn’t access your external disk.To summarize, the line in /etc/fstab should be one of these two.
LABEL=drivename /mnt/drivename/ auto rw,user,exec,nofail,x-gvfs-show,dev,auto,umask=000 0 0 LABEL=drivename /mnt/drivename/ auto rw,user,exec,nofail,x-gvfs-show,dev,auto,uid=Mongostein 0 0