A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.
Rules:
Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.
No spam posting.
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.
Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
No trolling.
Resources:
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
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.
Edit: I do have it in my fstab file listed by device ID with these settings:
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.
Like the other guy said, this doesn’t seem like it should be necessary. But I haven’t had to deal with fat formatted disks in a while so who knows.
The issue you’re having is in the mode. You’ll have to Google what the right setting is. It’s like the inverse of the permission mask or something.