Page 1 of 1

unknown permissions on downloaded files in complete folder

Posted: October 16th, 2016, 3:13 pm
by sabnzbd-bob
I’m not sure what has happened but it seems like the permissions to the shows written to the complete directory are totally messed up. I’m not sure how to fix it. I’ve given the sabnzbd user full control of the complete directory and any subfolders and files. Sabnzbd will download files but will not move them to the proper folder and rename them. If any one has any idea how to fix this I’d appreciate it. I can move and rename them manually but that is obviously less than ideal. Thanks


On the queue page in the history section for a show I get this error:

Exit(1) Unable to open URL: HTTP Error 500: Internal Server Error (More)


Which lead me to the script log that shows this error:

Loading config from /usr/local/sickbeard-custom/var/SickBeard/autoProcessTV/autoProcessTV.cfg

Opening URL: http://localhost:8081/home/postprocess/processEpisode?nzbName=tvshow.S02E03.720p.WEBRip.X264-DEFLATE-Obfuscated.nzb&quiet=1&dir=%2Fvolume1%2Ftvshows%2Fcomplete%2Ftvshow.S02E03.720p.WEBRip.X264-DEFLATE-Obfuscated
Unable to open URL: HTTP Error 500: Internal Server Error


If I drop the URL into a browser substituting the IP for localhost I get this error:

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
File "/volume1/@appstore/sickbeard-custom/var/SickBeard/cherrypy/_cprequest.py", line 660, in respond
response.body = self.handler()
File "/volume1/@appstore/sickbeard-custom/var/SickBeard/cherrypy/lib/encoding.py", line 193, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "/volume1/@appstore/sickbeard-custom/var/SickBeard/cherrypy/_cpdispatch.py", line 25, in __call__
return self.callable(*self.args, **self.kwargs)
File "/volume1/@appstore/sickbeard-custom/var/SickBeard/sickbeard/webserve.py", line 1429, in processEpisode
result = processTV.processDir(dir, nzbName, method=method, pp_options=pp_options)
File "/volume1/@appstore/sickbeard-custom/var/SickBeard/sickbeard/processTV.py", line 125, in processDir
videoFiles = sorted(filter(helpers.isMediaFile, fileList), key=lambda x: ek.ek(os.path.getsize, ek.ek(os.path.join, dirName, x)), reverse=True)
File "/volume1/@appstore/sickbeard-custom/var/SickBeard/sickbeard/processTV.py", line 125, in <lambda>
videoFiles = sorted(filter(helpers.isMediaFile, fileList), key=lambda x: ek.ek(os.path.getsize, ek.ek(os.path.join, dirName, x)), reverse=True)
File "/volume1/@appstore/sickbeard-custom/var/SickBeard/sickbeard/encodingKludge.py", line 62, in ek
result = func(*[callPeopleStupid(x) if type(x) in (str, unicode) else x for x in args])
File "/usr/local/sickbeard-custom/env/lib/python2.7/genericpath.py", line 57, in getsize
return os.stat(filename).st_size
OSError: [Errno 13] Permission denied: '/volume1/tvshows/complete/tvshow.S02E03.720p.WEBRip.X264-DEFLATE-Obfuscated/883bd7a16c244a8197a0c1e21369c516.mkv'


When I SSH into the NAS it shows the below file permissions.

user@synology:/volume1/tvshows$ ls -la
total 12
drwxrwxrwx+ 1 root users 4704 Oct 16 15:35 .
drwxr-xr-x 1 root users 254 Oct 8 04:42 ..
drwxrwxrwx+ 1 sabnzbd users 30 Oct 16 15:35 complete

user@synology:/volume1/tvshows$ ls -la complete/
total 8
drwxrwxrwx+ 1 sabnzbd users 148 Oct 16 04:58 .
drwxrwxrwx+ 1 root users 4704 Oct 15 19:47 ..
drwxrw-rw-+ 1 sabnzbd users 84 Oct 16 15:01 tvshow.S02E03.720p.WEBRip.X264-DEFLATE-Obfuscated
-rw-rw-rw-+ 1 sabnzbd users 6148 Oct 15 10:37 .DS_Store
drwxrwxrwx+ 1 root users 44 Oct 15 10:37 @eaDir

user@synology:/volume1/tvshows$ ls -la complete/tvshow.S02E03.720p.WEBRip.X264-DEFLATE-Obfuscated/
ls: cannot access complete/tvshow.S02E03.720p.WEBRip.X264-DEFLATE-Obfuscated/.: Permission denied
ls: cannot access complete/tvshow.S02E03.720p.WEBRip.X264-DEFLATE-Obfuscated/..: Permission denied
ls: cannot access complete/tvshow.S02E03.720p.WEBRip.X264-DEFLATE-Obfuscated/883bd7a16c244a8197a0c1e21369c516.mkv: Permission denied
ls: cannot access complete/tvshow.S02E03.720p.WEBRip.X264-DEFLATE-Obfuscated/@eaDir: Permission denied
total 0
d????????? ? ? ? ? ? .
d????????? ? ? ? ? ? ..
-????????? ? ? ? ? ? 883bd7a16c244a8197a0c1e21369c516.mkv
d????????? ? ? ? ? ? @eaDir

Not sure what’s with all the question marks but it does not appear to be good.

Re: unknown permissions on downloaded files in complete fold

Posted: October 17th, 2016, 1:14 am
by safihre
What did you set in Sabnzbd Folder settings to change the permissions to after downloading? 777?
What user is sickbeard run under? Probably you should change that, since sickbeard also can't read what sabnzbd wrote.

Re: unknown permissions on downloaded files in complete fold

Posted: October 22nd, 2016, 1:11 am
by sabnzbd-bob
Thanks, that was the problem. It did not like 666 or 755 for that matter. changing the setting to 777 fixed it.