directory/file permissions of downloads

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
User avatar
trmentry
Newbie
Newbie
Posts: 12
Joined: June 29th, 2008, 10:10 am

directory/file permissions of downloads

Post by trmentry »

I'm currently running 0.4RC2 (RC4 crushed my laptop when I accessed the gui so not sure what was up with that, will test more on that later.).

Anyway...I found the field in the config to set up permissions on files and entered  0644 as I wanted the files that way. :)   However it appears to create the directory the same way, so get a permission deny on trying to go into the directory b/c +x isn't on there. 

Is there a way to have sabnzbd+ create the directory as 755 and files under as 644?

I'm running sab on a headless Ubuntu 7.10 box. 

Thanks
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: directory/file permissions of downloads

Post by shypike »

You should set permissions to 755.
The files will automatically get 644, because SABnzbd never sets +X for files.
User avatar
trmentry
Newbie
Newbie
Posts: 12
Joined: June 29th, 2008, 10:10 am

Re: directory/file permissions of downloads

Post by trmentry »

I messed around after I made the post  and made the 755 change and saw that it worked the way I wanted.

One thing... and this is slightly minor... the wording of that line in the gui config section is:
Set permissions pattern for completed files, octal notation only!
So I made it 0644 b/c I thought it was for the files that would be extracted.  I know its under the Directory Tab in config, but the "...completed files..." made me think that it was for just files and not the directory, thus my post.

Thanks for a great utility.
davydm
Newbie
Newbie
Posts: 2
Joined: February 26th, 2010, 2:48 pm

Re: directory/file permissions of downloads

Post by davydm »

I'd just like to point out a small issue with 0.5 (I'm getting from the deb link for ubuntu on the main site, version 0.5.0-0ubuntu1~jcfp1~karmic):

When I unwittingly left off the leading zero -- ie, i set permissions to be "644", the permission-setting code fails (I see the logs for it) and sanzb goes on to delete the downloaded content even though it hasn't unpacked it. I found this after downloading 2x 400mb files ):

Perhaps the permissions code needs a fallback, something like:
try:
  # set permissions
except Exception as e:
  # bitch about permissions not working, but fall back on the same processing
  # as when no permissions string is set

it would have helped me a lot!

Thanks otherwise for a great utility!
davydm
Newbie
Newbie
Posts: 2
Joined: February 26th, 2010, 2:48 pm

Re: directory/file permissions of downloads

Post by davydm »

Have to backtrack here... IGNORE ME PLEASE (:

sabnzb had used the bad permissions -- the output files were there, just that I had to su and give them "real" permissions to be able to see them.

Lesson learned -- though some kind of check on the input on the permissions box would have helped me out here. "Nice to have" (:
Post Reply