Can't write to usb drive if it's mounted outside /media

Support for the Debian/Ubuntu package, created by JCFP.
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
stangdman
Newbie
Newbie
Posts: 3
Joined: September 11th, 2024, 11:46 am

Can't write to usb drive if it's mounted outside /media

Post by stangdman »

I'm setting up a plex server from an old Ubuntu laptop but was having trouble getting the plexmediaserver to see any folders mounted to /media. So, I followed the directions from plex linux tips to to mount it elsewhere via a line in the fstab file but since I did it fixed plex but sabnzdb errors out when I try to update the temp and complete folders in the config saying just error accessing. I'm guessing maybe I need to update the fstab to give sabnzdb access to the folder I mounted the drive to or something or maybe I need to run sabnzdb as a different user but I'm kind of spinning my wheels. Any ideas would be welcome right now I basically have to comment out the line in the fstab reboot and remount the drive to /media every time I want to download anything and then change it again to get plex to work after.
User avatar
jcfp
Release Testers
Release Testers
Posts: 1002
Joined: February 7th, 2008, 12:45 pm

Re: Can't write to usb drive if it's mounted outside /media

Post by jcfp »

Your question is of a more general linux administration nature and not really sabnzbd specific. Usually, usb sticks that get automatically mounted when you plug them into a linux desktop session and don't have a native unix filesystem on them, are set up with permissions that allow full access for the logged-in user account. Your sabnzbd probably runs under that very same account, so everything works out. When mounting such a drive via fstab, you'll have to set some options to achieve the same, with the details depending on the filesystem in use on that usb stick (see 'man mount', in particular the sections about mount options for filesystems such as fat or ntfs).
stangdman
Newbie
Newbie
Posts: 3
Joined: September 11th, 2024, 11:46 am

Re: Can't write to usb drive if it's mounted outside /media

Post by stangdman »

Thanks that points me in a direction I have been going back and forth on if I need to update sab (like a configuration file change) or something else. Nothing seems to be working right now. I had to mount the drive to a folder that was owned by my user to make plex be able to see it so I assumed this is also an ownership issue but I think sab should also be running as my user as well. I tried putting my users uid in the config file but that didn't do anything.
User avatar
jcfp
Release Testers
Release Testers
Posts: 1002
Joined: February 7th, 2008, 12:45 pm

Re: Can't write to usb drive if it's mounted outside /media

Post by jcfp »

When the usb stick is plugged-in and usable for sabnzbd, the output of the "mount" command in a terminal might just list all the info you need - including the options used to make it accessible for your user.
stangdman
Newbie
Newbie
Posts: 3
Joined: September 11th, 2024, 11:46 am

Re: Can't write to usb drive if it's mounted outside /media

Post by stangdman »

Solved it,
1. mounted with the fstab entry that the plex linux tips suggested and it was changing the ownership and permissions of the folder and everything on the drive to root,
2. unmounted and remounted with the fstab commented out and when ubuntu mounts it in /media it has my user as the owner,
3. changed the fstab entry from 'default' to 'user' and the folder and the drive once it's mounted retained the ownership I'd given them (my user)
4. Now both plex and sabnzbd can see them

Thanks, that helped I was trying a million different things
Post Reply