Closed Skyline404 closed 1 year ago
Can you please share your full docker start up command/docker compose file for this image.
Feel free to obfuscate any PII but keep the fields there so I can see what is being set.
Would also like to see the permission on those 2 db files
docker-compose:
qbitrr:
image: drapersniper/qbitrr
container_name: qbitrr
user: ${PUID}:${PGID} # Required to ensure teh container is run as the user who has perms to see the 2 mount points and the ability to write to the CompletedDownloadFolder mount
tty: true # Ensure the output of docker-compose logs qbitrr are properly colored.
restart: unless-stopped
depends_on: # Not needed but this ensures qBitrr only starts if the dependencies are up and running
- qbittorrent
- sonarr
- radarr
security_opt:
- no-new-privileges:true
network_mode: 'service:gluetun'
environment:
- TZ=${TZ}
volumes:
- /etc/localtime:/etc/localtime:ro
- ${DOCKERDIR}/qbitrr/config:/config # All qbitrr files are stored in the `/config` folder when using a docker container
- ${DOCKERDIR}/sonarr/config/sonarr.db:/sonarr/sonarr.db # This is only needed if you want episode search handling :ro means it is only ever mounted as a read-only folder, the script never needs more than read access
- ${DOCKERDIR}/radarr/config/radarr.db:/radarr/radarr.db # This is only needed if you want movie search handling, :ro means it is only ever mounted as a read-only folder, the script never needs more than read access
- ${STORAGE}/complete:/data/complete:rw # The script will ALWAYS require write permission in this folder if mounted, this folder is used to monitor completed downloads and if not present will cause the script to ignore downloaded file monitoring.
config: link
compose: link
permissions on db files everywhere the same: .rwxrwxr--
Soo looking at the code and the tracebacks these sections aren't trying to write ... having a quick look online about the root issue sqlite3.OperationalError: attempt to write a readonly database
It appears to be somewhat of what I was expecting:
The user running the container user: ${PUID}:${PGID}
doesn't seem to have the correct perms on agaisnt all files.
Are you running Sonarr/Radarr as a different user than Qbitrr ? this could be the issue as the user running qbitrr doesn't have proper perms (One thing you can do is start the container without :ro
and see if the error disappear, if it doesn't it is very very likely a permission issue at a folder level):
- ${DOCKERDIR}/sonarr/config/sonarr.db:/sonarr/sonarr.db # This is only needed if you want episode search handling :ro means it is only ever mounted as a read-only folder, the script never needs more than read access
- ${DOCKERDIR}/radarr/config/radarr.db:/radarr/radarr.db # This is only needed if you want movie search handling, :ro means it is only ever mounted as a read-only folder, the script never needs more than read access ```
Error is definitely in permissions, DB files mounting with root-only permissions, so if I start the container as root it will work just fine.
When I get home i'll double check the docker image to see if the permissions are being broken during container creation - I don't run as root and I don't have any issues but just in case.
Just to clarify it, it's probably one of the parent folders with the incorrect perms rather than the file themselves given that the files have rwxrwxr--
i.e 774
Maybe one of the parent folder has something like rwx------
i.e 700
Created folder and mounted DB files inside are owned by root:
Hmm in that case the files should still have read access .. can you cd up one directory and run ls -la .
I'm wondering what the perms are in the actual folders
Permissions inside a container are right 1000:993, but still, he can't work with the database, strange, only if I mount DB files in the exposed "/config" folder and then manually change owner on host bind from root to 1000:993 it starts to work.
Due to no further reports, will be closing this. Please reopen if it happens again, but it seems like a permission issue.
I'm using docker version of the script, mounted db files like this:
but getting errors on container start: