Raspberry Pi 2
OSMC October release
NTFS formatted harddrive connected via USB (accessed via /media/myusbdrive/)
Transmission accessed via webUI on a laptop within same home network
/media/myusbdrive/Downloads/incomplete ← thats my incomplete folder
/media/myusbdrive/TV Shows ← thats the default download location
/media/myusbdrive/TV Shows/nameofshow ← that’s an example of what I do using “Set Location”
The issue: “Permission denied” error in Transmission. But it does not always happen always! It happens:
- When I add 1 magnet to Transmission, in most cases it just downloads, even if I use Set Location (example above).
- When I add 2 magnets, one of them shows “Permission denied” as soon as it starts downloading (after it has received metadata) or immediately after I use Set Location.
- When I add 3 magnets, in ALL cases, 2 of them show “Permission denied”, even without using Set Location. The third one finishes downloading.
I read through this topic: [Solved] transmission-daemon and debian-transmission user
But the solution presented there is already in place by default (User=osmc in the transmission.service file).
I checked the transmission.service file, it seems fine, I did add Nice=7 a while ago but I removed it (stopped the service, reloaded systemctl, restarted the service, also rebooted a couple of times since then):
osmc@KodiTV:/lib/systemd/system$ cat transmission.service
Description=Transmission BitTorrent Daemon
ExecStart=/usr/bin/transmission-daemon -f --log-error --allowed *.*.*.*
It is a bit of a mystery to me why this is happening. I also tried chmod -R 777 /media/myusbdrive/
I did some more testing and it seems I now always get Permission denied when downloading to the default folder (/media/mysusbdrive/TV Shows) or a subfolder of that one.
But if I add a magnet, pause it immediately, change the location to /myusbdrive/Movies and resume, it downloads fine!
Even if I change the location when the download is at 13%, to /TV Shows/subfolder, it finishes successfully without Permission denied!
This means Transmission DOES have permission to write to /TV Shows/ folder. But I have enabled incomplete folder, so it should not be related to /TV Shows/ at all…
It seems the system sometimes blocks Transmission’s access to the drive.
SSH in and do
ls -al /media/myusbdrive/
Maybe there is a difference in permissions between the folders.
It looks fine to me, except for the “…”
osmc@KodiTV:~$ ls -al /media/myusbdrive/
drwxrwxrwx 1 osmc osmc 4096 Oct 29 14:33 .
drwxr-xr-x 3 root root 4096 Nov 5 01:44 ..
-rw-rw-rw- 1 osmc osmc 0 Aug 6 15:29 .stfolder
drwxrwxrwx 1 osmc osmc 4096 Oct 30 10:28 .sync
drwxrwxrwx 1 osmc osmc 0 Aug 6 16:04 Documents
drwxrwxrwx 1 osmc osmc 4096 Oct 29 12:47 Downloads
drwxrwxrwx 1 osmc osmc 49152 Nov 3 16:03 Movies
drwxrwxrwx 1 osmc osmc 4096 Oct 29 12:47 Music
drwxrwxrwx 1 osmc osmc 8192 Oct 30 10:30 Pictures
drwxrwxrwx 1 osmc osmc 4096 Jun 14 19:42 System Volume Information
drwxrwxrwx 1 osmc osmc 12288 Oct 28 22:07 TV Shows
So I checked /media:
osmc@KodiTV:~$ ls -al /media/
drwxr-xr-x 3 root root 4096 Nov 5 01:44 .
drwxr-xr-x 23 root root 4096 Oct 28 18:04 ..
-rw-r--r-- 1 root root 232 Mar 6 2015 README
drwxrwxrwx 1 osmc osmc 4096 Oct 29 14:33 myusbdrive
This seems correct to me
the dots are just links to the higher directory. ie.
My next guess is that it has something to do with the NTFS filesystem it looks like you’re using. I use ext4, though as it’s much more compatible with linux so I’ve never run into problems like you’re having.
Solved by deleting /osmc/.config/transmission-daemon/ (probably wasn’t necessary though) and creating a new folder for my tvshows. After succesfull tests with Transmission I moved all my media to that folder and deleted the troubled folder. After that I renamed the new folder and all still worked fine. I must have messed up something while figuring out stuff for Syncthing. All good now.