midgetspy/Sick-Beard — pull request #347 by itofzo (2012-04-01 10:38:17+00:00)
Title: Add Check permissions before changing permissions

Starting point: ERROR result in logfile POSTPROCESSER :: Failed to set permission

Also possible ERROR POSTPROCESSER :: Failed to respect the set-group-ID
when target directory has different group-ID.

On linux when download user and SickBeard user are not the same
(like in Zebulon packages for Synology NAS) moving files will
result in download user still owning the files.

SickBeard always tries to chmod permissions (even when already correct)
this results in error, because only root or owner are allowed to do this.

Add Check if change is necessary (permissions already correct) like in fixSetGroupID
Add Check if user is allowed to change permissions.