Unable to apply permissions to

Recently I have seen a number of these warnings in the Sonarr logs and I wanted to know how I could fix this. I saw some threads on *nix permission issues so I turned off the setting to have Sonarr change perms after moving/creating files but I still see these errors. Anybody got a clue as to why this is happening?

System:

OS: Ubuntu 13.10
Branch: develop (Auto-update, this has been happening for a couple versions now but I only started using Sonarr ~2 weeks ago)
Version: 2.0.0.2599

Here is the message:

Unable to apply permissions to: /Media9/TV/SERIES NAME/Season X/SERIES NAME.S01E15.EPISODE NAME.Bluray-1080p-thumb.jpg: Error setting file owner and/or group: EPERM

Here is the exception:

NzbDrone.Mono.LinuxPermissionsException: Error setting file owner and/or group: EPERM
  at NzbDrone.Mono.DiskProvider.SetPermissions (System.String path, System.String mask, System.String user, System.String group) [0x00000] in <filename unknown>:0 
  at NzbDrone.Core.MediaFiles.MediaFileAttributeService.SetMonoPermissions (System.String path, System.String permissions) [0x00000] in <filename unknown>:0 

Let me know if you all need anything else from me. Thanks!

Unless you’re running as root you can’t change the owner of a file, just the group, if you’re the owner of the file, not sure if you only “own” it via group writes.

Sorry, I should have added. It appears that Sonarr is creating new season folders with the owner:group of josh:nogroup when it should be (and every other folder is) josh:josh. Doing a chown -R josh: . in the affected folder fixes it and keeps Sonarr quiet but this feel wrong. Why does Sonarr create folders with a group of nogroup? (Never had this issue with SB/SR or with any other downloaders I use).

Sonarr isn’t explicitly setting it the group to nogroup, but I believe there is a way to enforce the default group when creating new folders/files.

Is this a local drive or a share?

Ok I used the commands from here on my server. I should know within an hour or so if it fixed it.

The commands for those interested

find /MediaXX -type d -exec chgrp josh {} +
find /MediaXX -type d -exec chmod g+s {} +

Where /MediaXX is one of my drives I store media on. I did this for all of them.