Page 1 of 1

Automatically set owner of downloads?

Posted: February 21st, 2008, 5:37 pm
by Comedy
Hi, Fisrt of all I'll point out that sabnzbd is great.. I've been trying to find a decent linux usenet client for a while now and I found it.

I have one problem though.... once a download completed the files and the directories created are owned by root and I don't even have permission to view them. I've been getting by this with 'chmod -R me /my/download/folder' but I was wondering if there's a way for the files to automatically be saved as mine?

Thanks

Re: Automatically set owner of downloads?

Posted: February 21st, 2008, 5:43 pm
by duz
You could run SAB as yourself using sudo -u.  That's what I do, but I'm lazy.

Re: Automatically set owner of downloads?

Posted: February 21st, 2008, 5:53 pm
by Comedy
Thanks for the suggestion, I just gave it a try but it didn't work... The server wouldn't come up. I chown'd all the sabnzbd files too to make sure there was no rights issues but I'm getting errors now from cherrypy in /var/lib/. I don't really want to chown all of that too.

I'll keep trying to mess with it but if anyone knows a way for sabnzbd to automatically save files as another user.. please :)

Re: Automatically set owner of downloads?

Posted: February 21st, 2008, 6:09 pm
by shypike
Use the --permissions option on the commandline.

./SABnzbd.py --permissions 0777

Will make all files accessible for everyone.

Documented in:
http://sabnzbdplus.wiki.sourceforge.net ... ermissions

Re: Automatically set owner of downloads?

Posted: February 21st, 2008, 6:10 pm
by mdamen
You have two options, either change permissions to some world readable... please see the wiki:

http://sabnzbdplus.wiki.sourceforge.net ... ermissions

Or you could create a post script doing the chown for you...

Re: Automatically set owner of downloads?

Posted: February 22nd, 2008, 1:42 pm
by duz
You can also add yourself to whatever group sab is running in and make sure the files are output as group read/write.

Re: Automatically set owner of downloads?

Posted: February 22nd, 2008, 5:07 pm
by DeXeS
Run it as the user you want to have permission:

Code: Select all

sudo -u duz -H /home/duz/SABnzbd-0.3.1/SABnzbd.py
change the directory and user you want to have permission only

if you add --permissions 0770 extra, the user it runs has full permission, the group that the user is in has full permission and the rest have no permission.

correct me if im wrong... only using unix for 2 months  ;)