ErrNo 13 Permission denied
Posted: December 5th, 2009, 6:57 pm
I'm sure this is going to turn out to be a stupid mistake on my part, but I've been wrestling with this issue for a couple hours now and could use some help, I'm just not seeing it. I recently transitioned from Windows to Linux (Debian Server) for my SABnzbd box. I set everything up and it was working fine. Today, however, for every download that completes and requires an unrar step, SABnzbd fails with the error "[ErrNo 13] Permission denied". I have checked my download directory, and both the complete and incomplete directories are set to 777. SAB is setup to make the completed files 777 also. In the incomplete directory while the download is happening, the created directory is set to 700. I think this should be OK. The owner of the directory and the user starting sab are the same (only 2 accounts on the box, root and otakucode. Running SAB as otakucode, created directories as otakucode, etc). unrar is at /usr/local/bin/rar/unrar with a symlink in /usr/bin, where sab finds it and is the 3.91 beta, the newest as of a couple days ago. If I change into the "_FAILED_whatever" directory and execute an unrar x whatever.rar, everything extracts fine. I cannot figure out why I am getting this permission error. For downloads that do not require an unrar step, processing succeeds, so it seems to be pointing at a problem with unrar.
Here is an example failure from the logs:
sabnzbd.log.2:2009-12-05 16:22:58,124::ERROR::[newsunpack:417] Error "[Errno 13] Permission denied" while running rar_unpack on Whatever
Any ideas would be appreciated.
Update: I just discovered that in the SAB log file, the following line appears:
2009-12-05 19:01:39,023::INFO::[SABnzbd:414] unrar binary... found (/usr/local/bin/rar)
This, I believe, is a problem... likely the problem. /usr/local/bin/rar is a DIRECTORY which contains the rar and unrar executables, not an executable itself. So how does SAB decide which paths to search and how can I convince it not to do this? There are symlinks in /usr/bin to both the rar and unrar executables. If I execute a "which rar"/"which unrar" from the commandline (using the same otakucode account that sab runs under) it points me to /usr/bin/rar (or unrar, respectively). I am a bit perplexed as to how sab comes to glom on to the directory in /usr/local/bin. There doesn't seem to be any setting in sabnzbd.ini that affects where it searches... What can I do to discourage it from tripping up on this? I think this would probably qualify as a bona fide bug BTW.
Here is an example failure from the logs:
sabnzbd.log.2:2009-12-05 16:22:58,124::ERROR::[newsunpack:417] Error "[Errno 13] Permission denied" while running rar_unpack on Whatever
Any ideas would be appreciated.
Update: I just discovered that in the SAB log file, the following line appears:
2009-12-05 19:01:39,023::INFO::[SABnzbd:414] unrar binary... found (/usr/local/bin/rar)
This, I believe, is a problem... likely the problem. /usr/local/bin/rar is a DIRECTORY which contains the rar and unrar executables, not an executable itself. So how does SAB decide which paths to search and how can I convince it not to do this? There are symlinks in /usr/bin to both the rar and unrar executables. If I execute a "which rar"/"which unrar" from the commandline (using the same otakucode account that sab runs under) it points me to /usr/bin/rar (or unrar, respectively). I am a bit perplexed as to how sab comes to glom on to the directory in /usr/local/bin. There doesn't seem to be any setting in sabnzbd.ini that affects where it searches... What can I do to discourage it from tripping up on this? I think this would probably qualify as a bona fide bug BTW.