jcfp wrote:
Other options include making group1 the primary group of user1; using sgid bit on relevant directories to inherit group ownership of files created in them (chmod g+s ); or using a postprocessing script with a simple chgrp command (once again, may require the user to be a member of the relevant group).
btw: sticky bit on a directory in linux (as commonly used on /tmp) prevents stuff from being deleted by anyone but the owner (or superuser), afaik it is not a way to inherit ownership.
Thanks - I used sgid and it works great. As well as doing a "chmod -R g+s" to the root download directory, I had to set the sgid in the SABnzbd settings too. I set "Permissions for completed downloads" to 2770 instead of just 770 which i had before.
I found this a bit strange because as a test I did chmod g+s to a directory "dir1", then I created "dir2" inside. "dir2" correctly inherited the group. Then I did a "chmod 770 dir2" and it correctly came out as drwxrws--- ; so it kept the sgid even though I did a chmod 770 instead of 2770.
So you would expect that if I do "chmod -R g+s" to the root download directory, then "Permissions for completed downloads" could just be 770 rather than 2770. But when it's 770, subdirectories then become drwx--S-- (note the capital S), which doesn't make sense to me.
Confusing, but at least it works with 2770.
shypike wrote:
It started as an experiment by the original author.
Python is a beautiful language, but far from ideal for this application.
We're especially not impressed by its TCP/IP l library and memory manager.
This is what we have and its time-consuming enough as it is.
No plans for re-writing it in C++ (yuck).
Ah I see. Yeah definitely not ideal but I can understand that it started as a home project. I always begin everything in Python, but as soon as the subprocesses become messy it starts to struggle for speed.
Thanks for the help guys.