Synology Running as a different user - chmod/chown permission problems

I’m currently running nzbdrone on my synology nas, latest update as of time of writing.

The issue I have is that upon setting the permissions setting to my preference. The metadata will follow the permissions I set in drone, but the actual media file doesn’t change the user or permission I set.

I run drone as danfozzy:users I set drone to change permissions to 0777 and danfozzy:users.

The metadata follows this but the actual media file is set as nzbdrone:users with permissions rw-r-r this is causing issues when trying to change time and date info to the episode air timings.

I don’t understand why the user nzbdrone is being set when drone isn’t run under that as a user

Log - http://pastebin.com/DVcseeM8

Metadata files aren’t affected by that setting currently: https://trello.com/c/HAgderxC/803-chmod-for-metadata

So what about the media file, that means that setting is doing nothing on my system?

on synology drone runs under the nzbdrone user by default, did you change that?

Users on *nix systems can’t give files away, so drone running as nzbdrone won’t be able to change the owner.

The logs show that the permissions aren’t being set, which is likely because you’re trying to give the file to another user.

14-10-15 05:17:20.8|Warn|EpisodeFileMovingService|Unable to apply permissions to: /volume1/tv shows/About a Boy/Season 02/About a Boy - S02E01 - About A Vasectomy.mp4
 
NzbDrone.Mono.LinuxPermissionsException: Error setting file permissions: 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.EpisodeFileMovingService.SetPermissions (System.String path, System.String permissions) [0x00000] in <filename unknown>:0

Yes I changed the start stop script to run under the user danfozzy.

I run nzbdrone under user danfozzy, which is why I set the permissions to danfozzy but still some how the user is being set as nzbdrone during the rename and import process?

Is mono now running under danfozzy? ps aux | grep mono should show you. drone doesn’t set file permissions to a particular user during the import process, outside of what is set in settings (but thats likely not going to work anyways).

Sounds like drone is still running under the nzbdrone user or the syno is setting permissions when the files are moved.

just check nzbdrone:

12864 danfozzy 224m S N /usr/local/mono/bin/mono /usr/local/nzbdrone/share/NzbDrone/NzbDrone.exe

i cant set the user for mono with the start stop script, not sure if i can for a package like mono?

Looks like mono is running under danfozzy there… mono runs drone, which is started via the start/stop script. You shouldn’t need to customize anything else.

Not sure if there is something else that would affect how permissions are applied when files are moved (maybe inherited permissions). Hopefully someone more familiar with syno’s permissions can weigh in as this is not a drone issue at this time.

i dont understand how the permissions do get changed at some point to “nzbdrone” from nzbget, which is also run under danfozzy?

Found the issue, it was an app permission issue within user settings in the synology control panel, funny that it was the only one unticked as I’ve never had to go on that settings page before.

Its now setting them correctly on the media files :slight_smile: