RuudBurger/CouchPotatoServer — pull request #2496 by Ski-lleR (2013-11-20 05:37:21+00:00)
Title: Fix "Failed settings permissions for File" (os.chmod(dest, Env.getPermission('file')))

On my system, each apps runs on it's own user (sabnzbd, transmission, couchpotato etc...) and one group (NAS)

The problem is when couchpotato try to copy/move during postprocess, he can't change permissions with os.chmod because he's not the owner (transmission or sabnzbd).

With this fix, even if file is created with other user (sabnzbd, transmission...), the owner of copied/moved file is changed to parent folder (couchpotato user because he create the final folder movie), and os.chmod can apply the permissions defined in settings, and remove the error concerning the permissions.

Because launching all service with the same user (as proposed somewhere) is not the solution (just hacky and not a real solution)

Nothing is impossible
Thanks to nberlee