Sonarr cannot add files previously downloaded (Jessie) from the completed torrents folder due to lack of permission
Attempted a bug report but received ‘[FAILED] DietPi-Bugreport | Failed to connect to SFTP server. Please try again later or report this to DietPi forum or GitHub repo in the first place.’
It was a clean install but I will re-do the install later today. I managed to save some of the bug report files from tmp before they were removed so I can send these.
Deluge services error:
root@Odroid:~# systemctl status deluge-web.service
● deluge-web.service - DietPi Deluge-web Service
Loaded: loaded (/etc/systemd/system/deluge-web.service; disabled; vendor pres
et: enabled)
Active: active (running) since Wed 2019-01-02 19:03:28 AEDT; 13h a
go
Main PID: 1308 (deluge-web)
CGroup: /system.slice/deluge-web.service
└─1308 /usr/bin/python /usr/bin/deluge-web -l /var/log/deluge-web.log
-L warning
Jan 02 19:03:28 Odroid systemd[1]: Started DietPi Deluge-web Service.
Jan 03 08:45:53 Odroid systemd[1]: [/etc/systemd/system/deluge-web.servi
ce:5] Failed to parse service type, ignoring: simple #forking causes systemd-tty
-ask-password-agent hang
root@Odroid:~# systemctl status deluged.service
● deluged.service - DietPi Deluged Service
Loaded: loaded (/etc/systemd/system/deluged.service; disabled; vendor preset:
enabled)
Active: active (running) since Wed 2019-01-02 19:03:28 AEDT; 13h a
go
Main PID: 1300 (deluged)
CGroup: /system.slice/deluged.service
└─1300 /usr/bin/python /usr/bin/deluged -d -l /var/log/deluged.log -L
warning
Jan 02 19:03:28 Odroid systemd[1]: Started DietPi Deluged Service.
Jan 02 19:03:34 Odroid deluged[1300]: /usr/lib/python2.7/dist-packages/deluge/_l
ibtorrent.py:59: RuntimeWarning: to-Python converter for boost::shared_ptr<libto
rrent::alert> already registered; second conversion method ignored.
Jan 02 19:03:34 Odroid deluged[1300]: import libtorrent as lt
Incomplete torrents permissions:
ls -l /mnt/HardDrives/Gabe/Other/Incomplete
total 12
drwxr-xr-x 6 debian-transmission dietpi 4096 Dec 27 01:01 xxxx
drwxr-xr-x 9 debian-transmission dietpi 4096 Dec 27 01:46 xxxx
drwxr-xr-x 7 debian-transmission dietpi 4096 Dec 27 01:05 xxxx
I will report whether these issues occur after fresh install. Some of these problems (permissions) may be related?
On fresh install, deluged service error still present but can download. Transmission-daemon still does not move completed files. Sonarr not tested. qBittorrent login fails.
The peers drop off in Deluge and no files are written so it seems to be the case.
It’s an external drive (ext3 formatted) mounted with Fstab (used to do this manually so still do). Never had a problem with Jessie. Downloading with Deluge works to /mnt/dietpi_userdata/downloads which is owned by root. My other download folders seem to be owned by sonarr or transmission.
Thanks for the suggestions WarHawk, seems to have fixed Transmission (completed downloads now move from incomplete to complete).
However, sonarr can’t import them. It works if I change the permissions to sonarr:sonarr but the default for downloaded files from Transmission is debian-transmission:dietpi.
I’ve tried ‘usermod -a -G’ for all combinations but this hasn’t worked even with 777 permissions.
Gabba
You are on current DietPi v6.19.7 currently, right?
EDIT: Hehe I read the topic from top to bottom while writing, so some of the fixes below seem to not be required anymore. However might be still useful/interesting and/or fix remaining issues .
Deluge
About the download issue, I am currently doing a test install and check, whether downloads work fine here. EDIT: Download works well here, even without any incoming port opened to the test VM:
root@VM-Stretch:/mnt/dietpi_userdata/downloads# l
total 4
drwxrwxr-x 2 deluge dietpi 4096 Jan 15 20:55 XXXX
The error you see in systemctl status deluge-web.service is due to changes in systemd, not allowing in-line comments anymore. However, since the desired Type=simple is default anyway, this should not cause any issues, nor change anything. Simply remove the line from the systemd unit, to get rid off the error despite:
sed -i '/^Type=/d' /etc/systemd/system/deluge-web.service
systemctl daemon-reload
systemctl restart deluge-web
On which DietPi version did you install Transmission? Since v6.17 it runs as group dietpi and creates it’s downloads with correct 660/770 permissions.
However, AFAIK we did not apply this patch on DietPi-Update, to not mess with existing configs. Please try the following to apply permission settings to your Transmission instance:
EDIT: Ah I see now you use a custom download location outside of dietpi_userdata. Please try to change ownership and permissions of the whole download location to allow dietpi full R/W access to them:
This might solve the Sonarr issue as well. Future downloads are already done with correct user/group, so this should work then automatically.
qBitTorrent
Note that the default password dietpi is only true, as long as you didn’t change it via dietpi.txt or dietpi-config. This is only a place holder for the actual global password you applied to your system.
Try to used the password you initially applied to dietpi.txt before doing the first boot, or in case the global password you set during first run setup or afterwards. The prompt should have asked you for two passwords: One for the unix users, one as global defaults for dietpi-software installs, which is the one that applies here.
Sonarr
With patch to DietPi v6.18 Sonarr should have been re-installed to at latest run with correct permissions.
But if the files were downloaded by downloaders, before the permission changes have been applied, it might be possible that those downloads do not yet have the correct ownership.
Which download location do you use? /mnt/dietpi_userdata/downloads should be the default and every dietpi-software install should apply the correct ownership automatically.
EDIT: See above Transmission EDIT, the chown 775 and Transmission UMask 002 should grant all required permissions to Sonarr.
Bug report
Did you retest on fresh install on current DietPi versions? We changed our SSH domain for SFTP uploads to a sub domain, but patched that on DietPi-Update.
Please try: G_CHECK_URL ssh.dietpi.com
If that works, but bug report still fails, try to re-apply the fix manually, but run the below only, if you are really on current DietPi version, since we changed G_CONFIG_INJECT command to not require any special char escaping anymore, which was required before:
Thanks for this comprehensive response, I’ve got everything working in a round-a-bout way and will use some of this info to reconfigure my system to make it more streamlined. I have multiple download clients running in different folders and Delgue and Transmission seem to be acting a little differently. At the moment I’m stuck with nothing working following the .20 update but that is under discussion in other threads. Will let you know how I go with these edits.
The v6.20 update issues should be resolved with v6.21. If you are still stuck, exit any dietpi-software prompt, if it appears automatically on login, then:
I’m new to DietPI and was having issues with qBittorrent permissions. I use radarr/sonarr and qbittorrent on a headless Pi 4 torrentbox. And there is a hardlink feature in both radarr/sonarr apps which was not working. After some investigation, I found the issue was with qBittorent, which created files with 755 permissions. So radarr/sonarr don’t have write permission for downloaded files and hardlinks failed to create.
Made some search over net, found this: https://deluge.readthedocs.io/en/latest/how-to/systemd-service.html
So I just edited the /etc/systemd/system/qbittorrent.service file, added UMask=002 under [Service] section and after reboot everything runs flawlessly!
Think this setting should be implemented in future releases.