I just tried changing some files to 666 - with these permissions I cannot delete the files using Windows File Explorer.
Nice to know that I'm not the only one! It would have been easier if this suggestion had been implemented, however it has forced me to learn more Linux - indeed I have now written my first ever script because of this! Thank you again for supporting me on the journey, I very much appreciate it.Joulinar wrote: ↑Wed Mar 17, 2021 11:03 pm There is an old request on qbit github to add a feature to be able to change permission
So, my solution (after a LOT of Googliing and trial & error!):
I created file
/home/qbittorrent/copyandperms.bash(I used this path as I saw it used in an example for another script I found, but maybe there is a better place for it). It took me a few trials to remember that it is neccesssary to make the file executable for it to work...
The contents of
Code: Select all
#!/bin/bash "%F"=$1 cp -r "$1" "/mnt/NFS_path/torrentdloads" chmod 777 -R "/mnt/NFS_path/torrentdloads" fi
"%F"=$1line is required, but the script does not work without it (i.e. just putting "%F" in the cp line does not work).
Finally, in the "Run external program on torrent completion" box in Qbittorrent I put:
As summary of what this achieves (for the benefit of those reading this post having skipped the pages since my first post!):
1 - Copies Qbittorrent downloads on completion, from my DietPi box to my NAS (leaving the original download for Qbittorrent to continue seeding whilst allowing me to do what I like with the copies).
2 - Changes folder & file permissions of the copied items (so that they can be easily moved to wherever they are needed e.g. using Windows File Explorer. Without this step permissions must be changed manually every time).