Issues with torrents and file 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 :wink:.

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
G_CONFIG_INJECT 'UMask=' 'UMask=002' /etc/systemd/system/deluged.service '\[Service\]'
systemctl daemon-reload
systemctl restart deluged
  • 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

EDIT: Fixed for v6.20:
https://github.com/Fourdee/DietPi/commit/831b3d0182606bfeb1398c9b81ee54aed6427ca0
https://github.com/Fourdee/DietPi/commit/46fd871751208c751622084d145723b42299efbc

Transmission

  • 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:
mkdir -p /etc/systemd/system/transmission-daemon.service.d
echo -e '[Service]\nGroup=dietpi' > /etc/systemd/system/transmission-daemon.service.d/dietpi-group.conf
sed -i '/^}/d' /etc/transmission-daemon/settings.json
G_CONFIG_INJECT '\"umask\":' '    "umask": 7,' /etc/transmission-daemon/settings.json
echo '}' >> /etc/transmission-daemon/settings.json
systemctl daemon-reload
systemctl restart transmission-daemon
  • 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:
chown -R dietpi:dietpi /mnt/HardDrives/Gabe/Other
chmod -R 775 /mnt/HardDrives/Gabe/Other

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:
G_CONFIG_INJECT 'ssh.dietpi.com[[:blank:]]' 'ssh.dietpi.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDE6aw3r6aOEqendNu376iiCHr9tGBIWPgfrLkzjXjEsHGyVSUFNnZt6pftrDeK7UX+qX4FxOwQlugG4fymOHbimRCFiv6cf7VpYg1Ednquq9TLb7/cIIbX8a6AuRmX4fjdGuqwmBq3OG7ZksFcYEFKt5U4mAJIaL8hXiM2iXjgY02LqiQY/QWATsHI4ie9ZOnwrQE+Rr6mASN1BVFuIgyHIbwX54jsFSnZ/7CdBMkuAd9B8JkxppWVYpYIFHE9oWNfjh/epdK8yv9Oo6r0w5Rb+4qaAc5g+RAaknHeV6Gp75d2lxBdCm5XknKKbGma2+/DfoE8WZTSgzXrYcRlStYN' /root/.ssh/known_hosts
  • Then retry to upload a bug report or send dietpi-survey, which connects to the same SFTP server.