Getting permission denied on raspbian

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
crik91
Posts: 4
Joined: Mon May 01, 2017 7:47 pm

Getting permission denied on raspbian

Post by crik91 » Mon May 01, 2017 7:50 pm

Hi, today I tried to install Transmission in my Raspberry Pi 3 with raspbian.
I have an unknown permission error.

I add a torrent file via web and it start to download it, around 5MB downloaded I see:

Code: Select all

Error: Permission denied (/srv/dev-disk-by-label-DiscoUsb/MyFiles/Torrent/FILENAME)
This is the situation of my folder tree:

Code: Select all

pi@raspberrypi:~ $ ls -al /srv/dev-disk-by-label-DiscoUsb/MyFiles/
total 44
drwxrws---+ 4 root users               4096 Apr 26 20:46 .
drwxrws---+ 9 root users               4096 Apr 27 12:47 ..
-rwxrwx---+ 1 root users               4096 Mar 19 22:46 ._.DS_Store
-rwxrwx---+ 1 root users               6148 Apr 26 20:46 .DS_Store
drwxrws---+ 3 root users               4096 Mar 19 22:45 .recycle
drwxrws---+ 6 root debian-transmission 4096 May  1 19:17 Torrent
pi@raspberrypi:~ $ ls -al /srv/dev-disk-by-label-DiscoUsb/MyFiles/Torrent/
total 21946116
drwxrws---+ 6 root debian-transmission       4096 May  1 19:17 .
drwxrws---+ 4 root users                     4096 Apr 26 20:46 ..
-rwxrwxrwx+ 1 root users                     4096 Mar 21 16:53 ._.DS_Store
-rwxrwxrwx+ 1 root users                     6148 Apr 30 00:43 .DS_Store
drwxrws---+ 2 root debian-transmission       4096 Apr 28 06:04 Incomplete
drwxrws---+ 2 root debian-transmission       4096 May  1 19:13 Watch
And this is my settings.json:

Code: Select all

    "alt-speed-down": 50,
    "alt-speed-enabled": false,
    "alt-speed-time-begin": 540,
    "alt-speed-time-day": 127,
    "alt-speed-time-enabled": false,
    "alt-speed-time-end": 1020,
    "alt-speed-up": 50,
    "bind-address-ipv4": "0.0.0.0",
    "bind-address-ipv6": "::",
    "blocklist-enabled": false,
    "blocklist-url": "http://www.example.com/blocklist",
    "cache-size-mb": 4,
    "dht-enabled": true,
    "download-dir": "/srv/dev-disk-by-label-DiscoUsb/Gioele/Torrent",
    "download-limit": 100,
    "download-limit-enabled": 0,
    "download-queue-enabled": true,
    "download-queue-size": 5,
    "encryption": 1,
    "idle-seeding-limit": 30,
    "idle-seeding-limit-enabled": false,
    "incomplete-dir": "/srv/dev-disk-by-label-DiscoUsb/Gioele/Torrent/Incomplete",
    "incomplete-dir-enabled": true,
    "lpd-enabled": false,
    "max-peers-global": 200,
    "message-level": 1,
    "peer-congestion-algorithm": "",
    "peer-id-ttl-hours": 6,
    "peer-limit-global": 200,
    "peer-limit-per-torrent": 50,
    "peer-port": 51413,
    "peer-port-random-high": 65535,
    "peer-port-random-low": 49152,
    "peer-port-random-on-start": false,
    "peer-socket-tos": "default",
    "pex-enabled": true,
    "port-forwarding-enabled": false,
    "preallocation": 1,
    "prefetch-enabled": 1,
    "queue-stalled-enabled": true,
    "queue-stalled-minutes": 30,
    "ratio-limit": 2,
    "ratio-limit-enabled": false,
    "rename-partial-files": true,
    "rpc-authentication-required": true,
    "rpc-bind-address": "0.0.0.0",
    "rpc-enabled": true,
    "rpc-password": "mypassword",
    "rpc-port": 9091,
    "rpc-url": "/transmission/",
    "rpc-username": "myusername",
    "rpc-whitelist": "127.0.0.1",
    "rpc-whitelist-enabled": false,
    "scrape-paused-torrents-enabled": true,
    "script-torrent-done-enabled": false,
    "script-torrent-done-filename": "",
    "seed-queue-enabled": false,
    "seed-queue-size": 10,
    "speed-limit-down": 100,
    "speed-limit-down-enabled": false,
    "speed-limit-up": 100,
    "speed-limit-up-enabled": false,
    "start-added-torrents": true,
    "trash-original-torrent-files": true,
    "umask": 18,
    "upload-limit": 100,
    "upload-limit-enabled": 0,
    "upload-slots-per-torrent": 14,
    "peer-socket-tos": "default",
    "pex-enabled": true,
    "port-forwarding-enabled": false,
    "preallocation": 1,
    "prefetch-enabled": 1,
    "queue-stalled-enabled": true,
    "queue-stalled-minutes": 30,
    "ratio-limit": 2,
    "ratio-limit-enabled": false,
    "rename-partial-files": true,
    "rpc-authentication-required": true,
    "rpc-bind-address": "0.0.0.0",
    "rpc-enabled": true,
    "rpc-password": "MyPASSWORD",
    "rpc-port": 9091,
    "rpc-url": "/transmission/",
    "rpc-username": "MYUSER",
    "rpc-whitelist": "127.0.0.1",
    "rpc-whitelist-enabled": false,
    "scrape-paused-torrents-enabled": true,
    "script-torrent-done-enabled": false,
    "script-torrent-done-filename": "",
    "seed-queue-enabled": false,
    "seed-queue-size": 10,
    "speed-limit-down": 100,
    "speed-limit-down-enabled": false,
    "speed-limit-up": 100,
    "speed-limit-up-enabled": false,
    "start-added-torrents": true,
    "trash-original-torrent-files": true,
    "umask": 18,
    "upload-limit": 100,
    "upload-limit-enabled": 0,
    "upload-slots-per-torrent": 14,
    "utp-enabled": true
}
I really don't know what to do. I tried to set transmission-daemon user to root (also in systemd) with no success because I will get 403: Forbidden.

I will appreciate any help.
Thank you!
;)

mike.dld
Transmission Developer
Posts: 283
Joined: Wed Dec 25, 2013 10:56 pm

Re: Getting permission denied on raspbian

Post by mike.dld » Tue May 02, 2017 1:58 pm

Transmission [incorrectly] reports final download path, while you may have incomplete download directory enabled and then that's where files are saved first until download is complete. Check the incomplete download directory to see if Transmission has access to write there.

crik91
Posts: 4
Joined: Mon May 01, 2017 7:47 pm

Re: Getting permission denied on raspbian

Post by crik91 » Tue May 02, 2017 2:20 pm

Hi, seeing my first post(where I post the list of folder permissions) seems that debian-transmission is the owner and has permission to write in the incomplete directory.

mike.dld
Transmission Developer
Posts: 283
Joined: Wed Dec 25, 2013 10:56 pm

Re: Getting permission denied on raspbian

Post by mike.dld » Tue May 02, 2017 4:07 pm

I was in a bit of a rush, so my appologies. Still, your incomplete directory is "/srv/dev-disk-by-label-DiscoUsb/Gioele/Torrent/Incomplete" and your ls shows permissions on "/srv/dev-disk-by-label-DiscoUsb/MyFiles/Torrent/Incomplete" which are two different paths. Do they both point to the same location?

crik91
Posts: 4
Joined: Mon May 01, 2017 7:47 pm

Re: Getting permission denied on raspbian

Post by crik91 » Tue May 02, 2017 4:10 pm

Is "/srv/dev-disk-by-label-DiscoUsb/Gioele/Torrent/Incomplete" everywhere. I tried to hide my name for privacy, with no success. Ahaha

mike.dld
Transmission Developer
Posts: 283
Joined: Wed Dec 25, 2013 10:56 pm

Re: Getting permission denied on raspbian

Post by mike.dld » Tue May 02, 2017 4:28 pm

Try creating the file there manually, e.g. by running something like `sudo -u debian-transmission touch .../Incomplete/test.txt` or `su debian-transmission "touch .../Incomplete/test.txt"`. Some systems require write access to parent directories all the way up.

crik91
Posts: 4
Joined: Mon May 01, 2017 7:47 pm

Re: Getting permission denied on raspbian

Post by crik91 » Wed May 03, 2017 9:40 am

Tried, permission denied:

Code: Select all

pi@raspberrypi:~ $ sudo -u debian-transmission touch /srv/dev-disk-by-label-DiscoUsb/MYUSER/Torrent/Incomplete/test.txt
touch: cannot touch ‘/srv/dev-disk-by-label-DiscoUsb/MYUSER/Torrent/Incomplete/test.txt’: Permission denied

mike.dld
Transmission Developer
Posts: 283
Joined: Wed Dec 25, 2013 10:56 pm

Re: Getting permission denied on raspbian

Post by mike.dld » Sat May 06, 2017 10:24 am

Might be the flags your disk is being mounted with?.. See e.g. https://unix.stackexchange.com/question ... sing-mount

Alan6842
Posts: 1
Joined: Thu Apr 18, 2019 9:00 am

Re: Getting permission denied on raspbian

Post by Alan6842 » Sat Apr 20, 2019 7:40 am

I recently got a raspberry pi and did a few test python programs on it to make sure everything was working. Whenever I try to execute the python script I get this message upsers

Post Reply