sebgl / htpc-download-box

Sonarr / Radarr / Jackett / NZBGet / Deluge / OpenVPN / Plex
1.97k stars 322 forks source link

Sonarr/Radarr/Deluge not moving files #60

Open emkowale opened 3 years ago

emkowale commented 3 years ago

Hello,

So I think I'm stuck on this part:

Note: You may need to chown -R $USER:$USER /path/to/root/directory so Sonarr and the rest of the apps have the proper permissions to modify and move around files. This Docker image of Sonarr uses an internal user account inside the container called abc some you may have to set this user as owner of the directory where it will place the media files after download. This note also applies for Radarr.

What's the deal with the abc user? I'm using a raspberry pi. Is my "$USER" pi or abc? I can get things into Deluge from Radarr and Sonarr just fine. They move to my "complete" directory, but they are not moved correctly. They go to "complete", but not "complete/tv" or "complete/movies" and they are not renamed correctly. Also, the torrents are not deleted from Deluge. Yes, I've taken care of the seeding ratio stuff. Even when no one is downloading from me the torrents are not deleted.

Here are my Linux absolute paths.... /mnt/downloads/incomplete /mnt/downloads/complete /mnt/downloads/complete/tv /mnt/downloads/complete/movies

downloads is a physical 6TB usb hard drive that I have mounted as downloads. Can anyone help a brother out? I think it may have something to do with raspberry pi/docker.

jbusuttil83 commented 3 years ago

The abc user is inside the sonarr docker container. So you would need to bash into the container using docker exec -it /bin/bash <container> and check / set permissions from there. This is always a headache to get working.

emkowale commented 3 years ago

Does anyone have any Linux Excedrin? lol I's starting to understand docker a bit. By typing "ifconfig" I see that it even creates its own little IP space.

emkowale commented 3 years ago

While I am thankful to the author of this git package for the opportunity to learn something new, I'm really not seeing the value of docker. I mean it general it seems to be a pain in the neck as far as permissions go. I learned this from hours of web searches. Sure it eased the installation of many software packages, but after the installation it seems pointless. This is my first experience with docker and it just seems like a thinned down VM. I'm thinking about just installing Deluge, Sonarr, Radarr and Jacket manually. Anyone have any thoughts on this?

emkowale commented 3 years ago

I think I'm getting closer. My downloads usb drive is NTFS and that may be causing issues. Still digging in. Feel free to jump in. I hope this helps someone else.

stanosaka commented 3 years ago

The command should be docker exec -it radarr /bin/bash

CrookedAutobot commented 1 year ago

The internal user for the docker container is not usually the same as the user logged into the computer. For all paths passed through into the docker container, you must provide the internal user with appropriate file system permissions. These permissions need to be assigned inside the docker container. Within the docker container give the internal user the appropriate file system permissions making sure that you have mapped the external file system to the correct internal file system. Inside the docker container, the /mnt/downloads/complete will have a different path such as / or /media depending on how you mapped it during the docker container configuration.

These two locations are used for deluge:

/mnt/downloads/incomplete
/mnt/downloads/complete

These are the locations you are intending to use for *arr docker container output

/mnt/downloads/complete/tv
/mnt/downloads/complete/movies

I would recommend using a different path altogether for the *arr docker container outputs such as:

/mnt/downloads/tv
/mnt/downloads/movies

However, the biggest issue people have is remembering to give the internal user for the *arr docker containers the correct file system permissions for /mnt/downloads/complete which is mapped to a different path inside the docker container.

ynazar1 commented 1 year ago

@CrookedAutobot brings up excellent point that's very much skimmed over in the guide. In short, the way paths setup is bad. Servarr wiki has very important write up about pathing here: https://wiki.servarr.com/docker-guide#consistent-and-well-planned-paths ...

In short... all the paths needs to be consistently mapped from same root to avoid crazy overhead. Example: Instead of using the below for sonarr:

- ${ROOT}/complete/tv:/tv # tv shows folder
- ${ROOT}/downloads:/downloads # download folder

use:

- ${ROOT}:/data # everything

then, configure all source/destination paths inside the settings.

This avoids HUGE moving overhead and double-writing on SSDs, making moves atomic (instantaneous), as all the file moving happens in the same folder structure as far as docker's view of it is concerned. I've actually had to rework every path in the guide to make sure everything is sane. Someday i'll publish a PR or my own copy or something to update this.