Can't delete folders from Couchpotato and more

Status
Not open for further replies.

osker246

Cadet
Joined
Apr 7, 2016
Messages
4
So I am fairly new to FreeNAS and this has me stumped. I use my server mainly as a HTPC. I have Sonarr, Couchpotato (CP), Transmission, Plex and Plexpy plugin/jails installed. For the most part everything works perfectly except CP has been causing me problems.

1) CP downloads/renames/moves folders into my plex library perfectly fine. I know this because the movies show up in plex fine and it creates folders in my movie folder. But movies will randomly delete in my movie folder. I can't figure out why it would do this.

2) Movie folders created in transmission's complete folder can not be deleted. I've tried doing this through windows, OS X, mounting freenas to my QNAP NAS, FTP. OS X and FTP tells me it in use. I've tried disabling all plugins/jails and rebooting. Nothings worked except for using command "rm -rf /mnt/media/transmission/complete/*".

I'm sure this is due to CP because I delete folders created by sonarr or myself perfectly fine. Does anybody have any idea how to troubleshoot this?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I'd check couchpotato's logs to see if it deleted these files. You could search them for the file/movie name and see if anything comes up. Though, I doubt couchpotato would delete files, unless it's told to somehow.

####

"I'm sure this is due to CP" < I'm pretty sure you're wrong here. I bet you can't delete the files created by transmission because they are being written with the default user/permissions or 'transmission'(UID=921) / 755.
You can either..
* make the protocol you want to modify files with, and transmission use the same user
* or, change the permission level transmission writes files with. ( See FreeNAS WebUI > left panel > Plugins > Transmission)
 

osker246

Cadet
Joined
Apr 7, 2016
Messages
4
Well damn...I did miss those permissions in transmission. I have already deleted plugins/jails to start from scratch 3 times and each time I am learning something new that I overlooked. As for CP logs...I no longer have the exact log since I redid the jail from scratch but it was spitting out an error similar to this. This is pulled from CP's forums of somebody else having somewhat similar issues. Which can be found here: https://couchpota.to/forum/viewtopic.php?t=9636

"
[ie.providers.info.omdbapi] Found: Monty Python and the Holy Grail (1975)
09-09 08:41:54INFO
[tato.core.plugins.renamer] Same quality release already exists for Monty Python and the Holy Grail, with quality 720p. Assuming repack.
09-09 08:41:54INFO
[tato.core.plugins.renamer] Removing "/media/Movies/Monty Python and the Holy Grail (1975)/Monty Python and the Holy Grail.orig.nfo"
09-09 08:41:54INFO
[tato.core.plugins.renamer] Removing "/media/Movies/Monty Python and the Holy Grail (1975)/Monty Python and the Holy Grail.mkv"

"
So I really do think it was an issue with CP's renamer possibly scanning downloads multiple times and deleting previous versions in my library. I just do not understand the rationale behind changing the "from" in the renamer to a blank directory as suggested in the thread. CP's forums won't let me register either to ask.

If you do not mind me asking now that I have your attention. With my latest attempts at installing CP I came across this error in the log. Where this film out of 3 downloaded would not move into the proper directory.

"
05-06 12:46:10 ERROR[tato.core.plugins.renamer] Couldn't move file "/media/downloads/[www.tnttorrent.info] Top Gun 1986 [720p.BluRay.DTS.x264.QiT-miguel] [Ekipa TnT]/Top Gun 1986 [720p.BluRay.DTS.x264.QiT-miguel] [ENG].mkv" to "/media/movies/Top Gun (1986)/Top Gun.mkv": Traceback (most recent call last): File "/usr/pbi/couchpotato-amd64/share/couchpotato/CouchPotatoServer/couchpotato/core/plugins/renamer.py", line 836, in moveFile os.unlink(old) OSError: [Errno 13] Permission denied: '/media/downloads/[www.tnttorrent.info] Top Gun 1986 [720p.BluRay.DTS.x264.QiT-miguel] [Ekipa TnT]/Top Gun 1986 [720p.BluRay.DTS.x264.QiT-miguel] [ENG].mkv'

"

There are a couple other errors that pertain to permission denied as well for files inside the folder. Would this be caused by my data set and jail having different users and permissions? I came across a thread created by you describing how to change users and permissions of jails which led me to the idea of why files would not delete when I chose to delete them via transmission. When I checked via shell my data set had user=nobody and group=nogroup (the guide I followed suggested this) and CP's jail user=root and group=wheel. I have now tried changing my dataset to match the jail but I haven't had any movies download to test and see if it works or not.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
The "From" directory, is where CP would search for downloaded files and move them, so stuff could potentially moved deleted from here, since CP is trying to move things from here to the "To" directory.

Your log is showing CP deleting a file to replace it with a more preferred quality/download.

Your errors are probably because CP doesn't have write permissions to the files transmission is downloading. Don't change the owner/group for the jail dataset; that would break stuff, as that contains the jail's operating system and application files. Changing the owner/group for the dataset could work for static files, but since transmission will keep adding files you need either its user to match, or for it to write files with more lax permissions. < These are the same 2 bullet points I said earlier, just worded different

There multiple solutions as I offer in that thread. I personally use "Solution 2" to change the user of transmission to 'media', so files it writes are readable/writable from CP.
 
Status
Not open for further replies.
Top