How to set permissions and ownership correctly for the downloads
Posted: Sat Apr 03, 2021 12:51 pm
Hey there,
I have problems with the permissions and ownerships of the files that are downloaded by deluge.
The problem is that when the files are downloaded (download folder is /home/cas/Downloads, so downloads folder of a different user but it is able to download to it fine), Sonarr and Radarr aren't able to process the downloaded file and plex can't add the movie or series to it's library because it doesn't have the permissions.
After some testing, I got the following information:
I tried chmod/chown 0777, 0666, cas:cas, cas:debian-deluged, root:root but nothing works. Including multiple combinations of chmod and chown, though I don't think chmod is the problem.
The users "plex", "sonarr", "debian-deluged" and "cas" are all in the group "debian-deluged", if I've set it up correctly though users, groups and permissions are by far not my speciality.
Do you have any idea where to start for making this work?
I have problems with the permissions and ownerships of the files that are downloaded by deluge.
The problem is that when the files are downloaded (download folder is /home/cas/Downloads, so downloads folder of a different user but it is able to download to it fine), Sonarr and Radarr aren't able to process the downloaded file and plex can't add the movie or series to it's library because it doesn't have the permissions.
Code: Select all
# /etc/systemd/system/deluged.service
[Unit]
Description=Deluge Bittorrent Client Daemon
Documentation=man:deluged
After=network-online.target
[Service]
Type=simple
UMask=000
User=debian-deluged
Group=debian-deluged
ExecStart=/usr/bin/deluged -d
Restart=on-failure
# Time to wait before forcefully stopped.
TimeoutStopSec=300
[Install]
WantedBy=multi-user.target
# /etc/systemd/system/deluge-web.service
[Unit]
Description=Deluge Bittorrent Client Web Interface
Documentation=man:deluge-web
After=network-online.target deluged.service
Wants=deluged.service
[Service]
Type=simple
UMask=000
User=debian-deluged
Group=debian-deluged
ExecStart=/usr/bin/deluge-web -d
Restart=on-failure
[Install]
WantedBy=multi-user.target
Code: Select all
[1]Radarr finds and adds the movie Deadpool to deluge; it downloads fine.
[2]When deluge is done downloading, this is the permissions for the file:
'Downloads/Deadpool (2016) [1080p] [YTS.AG]':
total 1728216
-rw-rw-rw- 1 debian-deluged debian-deluged 105827 apr 3 14:10 WWW.YTS.AG.jpg
-rw-rw-rw- 1 debian-deluged debian-deluged 1769571535 apr 3 14:21 'Deadpool.2016.1080p.BluRay.x264-[YTS.AG].mp4'
[3]Doing the following DIDN'T make radarr process the completed download aka it didn't work:
sudo chown -R cas:cas Downloads/*
'Downloads/Deadpool (2016) [1080p] [YTS.AG]':
total 1728216
-rw-rw-rw- 1 cas cas 105827 apr 3 14:10 WWW.YTS.AG.jpg
-rw-rw-rw- 1 cas cas 1769571535 apr 3 14:21 'Deadpool.2016.1080p.BluRay.x264-[YTS.AG].mp4'
[4]Doing the following DIDN't work:
sudo chown -R cas:debian-deluged Downloads/*
'Downloads/Deadpool (2016) [1080p] [YTS.AG]':
total 1728216
-rw-rw-rw- 1 cas debian-deluged 105827 apr 3 14:10 WWW.YTS.AG.jpg
-rw-rw-rw- 1 cas debian-deluged 1769571535 apr 3 14:21 'Deadpool.2016.1080p.BluRay.x264-[YTS.AG].mp4'
The users "plex", "sonarr", "debian-deluged" and "cas" are all in the group "debian-deluged", if I've set it up correctly though users, groups and permissions are by far not my speciality.
Do you have any idea where to start for making this work?