Permission's not being set recursively [ZFS/Solarish)

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
SpankIt
Newbie
Newbie
Posts: 21
Joined: September 23rd, 2009, 8:25 pm

Permission's not being set recursively [ZFS/Solarish)

Post by SpankIt »

I recently upgraded to SABnzbd 0.7.0 and am having some issues with the permission's not being applied to downloads recursively. SABnzbd is configured with permissions 0775 and only the downloaded NZB's folder has this permission set. The files within the ZFS's folder however only have 0666 permissions set on it. The permissions setting I have set in SABnzbd does make a difference at all. The end result is always the same. Is there any particular reason that this is happening?
Last edited by SpankIt on September 13th, 2014, 4:55 pm, edited 1 time in total.
ljw1
Newbie
Newbie
Posts: 11
Joined: July 12th, 2011, 3:54 pm

Re: Permission's not being set recursively

Post by ljw1 »

I have not had any success with getting sab to apply the set permissions on solaris. You might want to look at creating a script to achieve what you need.
SpankIt
Newbie
Newbie
Posts: 21
Joined: September 23rd, 2009, 8:25 pm

Re: Permission's not being set recursively

Post by SpankIt »

I've been looking at going that route as well. Thanks for the heads up.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Permission's not being set recursively

Post by shypike »

I recently checked this feature again.
The full folder tree is parsed, with folders getting their X-bit set (when the appropriate R bit is set).
I did, however, only test on Linux systems with vanilla EXT2/3/4 filesystems.
SABnzbd uses a standard Python call to set permissions (os.chmod),
so possibly this fails on ZFS systems?
I have no such system available for testing.

spankit: did things work for you when using release 0.6.15?
Both: I assume that you actually have a permissions setting in Config->Folders?
SpankIt
Newbie
Newbie
Posts: 21
Joined: September 23rd, 2009, 8:25 pm

Re: Permission's not being set recursively

Post by SpankIt »

The only way I was able to make it work was to create a post processing script to set the proper ACL on the folders and directories. Solaris (and other Solaris based OS's) have a different acl system for applying permissions on files. I am only assuming that it is a limitation within SAB that does not support these acl's.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Permission's not being set recursively

Post by shypike »

SABnzbd is written in Python.
All Python has available is the standard Posix API.
SpankIt
Newbie
Newbie
Posts: 21
Joined: September 23rd, 2009, 8:25 pm

Re: Permission's not being set recursively

Post by SpankIt »

For those of you wondering what I used as a script to make this happen here is my latest version.

Code: Select all

#!/bin/sh
### SYSTEM CONFIGURATION ###
PATH=/usr/bin:/bin

# Root directory where files are located.
ROOTDIR=/tank/files

# Get category folder name with proper case
CATDIR=$(ls $ROOTDIR | grep -i "^$5$")
echo $CATDIR

echo Setting Premissions on $CATDIR Folder
chmod A=user:dlmgr:rwxpdDaARWcCos:fd-----:allow $ROOTDIR/$CATDIR
chmod A+user:root:rwxpdDaARWcCos:fd----I:allow $ROOTDIR/$CATDIR
chmod A+owner@:rwxpdDaARWcCos:fd-----:allow $ROOTDIR/$CATDIR
chmod A+group@:rwxpdDaARWcCos:fd-----:allow $ROOTDIR/$CATDIR
chmod A+everyone@:r-xp--a-R-c--s:fd-----:allow $ROOTDIR/$CATDIR

echo Setting Premissions on "$1"
chmod -R A=user:dlmgr:rwxpdDaARWcCos:fd-----:allow "$1"
chmod -R A+user:root:rwxpdDaARWcCos:fd----I:allow "$1"
chmod -R A+owner@:rwxpdDaARWcCos:fd-----:allow "$1"
chmod -R A+group@:rwxpdDaARWcCos:fd-----:allow "$1"
chmod -R A+everyone@:r-xp--a-R-c--s:fd-----:allow "$1"
Running this script since my recent upgrade to OmniOS.
Post Reply