Permission's not being set recursively [ZFS/Solarish)
Forum rules
Help us help you:
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.
Permission's not being set recursively [ZFS/Solarish)
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.
Re: Permission's not being set recursively
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.
Re: Permission's not being set recursively
I've been looking at going that route as well. Thanks for the heads up.
Re: Permission's not being set recursively
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?
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?
Re: Permission's not being set recursively
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.
Re: Permission's not being set recursively
SABnzbd is written in Python.
All Python has available is the standard Posix API.
All Python has available is the standard Posix API.
Re: Permission's not being set recursively
For those of you wondering what I used as a script to make this happen here is my latest version.
Running this script since my recent upgrade to OmniOS.
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"