Page 1 of 1
Permission error on Apple TV
Posted: December 5th, 2011, 8:20 am
by workshy68
I have sabnzbd (0.6.6) running on an apple tv which works fine by itself but am having problems with a plugin for XBMC.
The plugin allows you to look up a nzb which then loads it into sabnzb to start the download. The plugin then allows you to watch the file as it downloads once the 1st & last .rar files have downloaded.
The download starts ok but the file never starts playing. I believe it is a permissions problem as the plugin requires read/write access to the incomplete folder.
All the folders created by sabnzbd have owner=root, but XBMC runs as owner=mobile. Is there a way to change the owner of sabnzbd? or allow read/write access for any owner to all the files/folders within the incomplete folder?
Re: Permission error on Apple TV
Posted: December 5th, 2011, 10:19 am
by shypike
If you run SABnzbd as root, the folders will be owned by root.
So the message is: don't run it as root but under the same account as XBMC.
Re: Permission error on Apple TV
Posted: December 5th, 2011, 10:22 am
by workshy68
Thanks for the reply.
This is all new to me so could you explain how i run under the XMBX account?
Re: Permission error on Apple TV
Posted: December 6th, 2011, 6:42 am
by workshy68
I sorted out the Apple tv which now works but am trying to sort out the permissions of the incomplete folder on my iMac.
I did a chmod -R 0777 on the folder but when a new download starts the permissions stay as :drwxr-xr-x when i am after :drwxrwxrwx.
I read a post on here about changing a line in the SABnzbd.py file and the only SABnzbd.py file i can find is in Contents/resources which shows when i show package contents of the SABnzbd in the applications folder.
The line i changed was: os.umask(prev and int('077',8))
which i changed to: #os.umask(prev and int('077',8)) but didn't work, so tried changing to: os.umask(prev and int('000',8)) and that still doesn't work.
How can this be done?
Re: Permission error on Apple TV
Posted: December 6th, 2011, 1:32 pm
by shypike
You should not disable the line, but add the proper umask, so:
os.umask(prev and int('000',8))
The side effect will be that you expose the SABnzbd admin files, including sabnzbd.ini to all accounts.
Not sure if you want that.
Re: Permission error on Apple TV
Posted: December 6th, 2011, 2:05 pm
by workshy68
I tried the correct umask but still get 'drwxr-xr-x' for the permissions on the folder.
Not too bothered about exposing the files for now...would just like to get it to work.
Re: Permission error on Apple TV
Posted: December 6th, 2011, 2:40 pm
by shypike
Isn't that good enough? Why do you need write access for the other accounts?
Re: Permission error on Apple TV
Posted: December 6th, 2011, 3:02 pm
by workshy68
For some reason unknown to me yet, the only way i got the xbmc plugin to work on the apple tv was having full read/write access on all accounts.
I'm now trying to get this to work on my mac so would like the same permissions on the incomplete folder. I just dont know why it's not happening with the change made to SABnzbd.py and performing chmod -R 0777 on the folder.