Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deluge file permissions! #1960

Closed
dirtycajunrice opened this issue Nov 27, 2015 · 9 comments
Closed

Deluge file permissions! #1960

dirtycajunrice opened this issue Nov 27, 2015 · 9 comments

Comments

@dirtycajunrice
Copy link

Deluge makes 755 file permissions when downloading and after completing. I would assume a 775 would be more accurate as group permissions would be assumed... If that is not the case how do i change?
thanks!

@Dr-Bean
Copy link
Contributor

Dr-Bean commented Nov 27, 2015

Deluge doesn't provide the functionality to set (unix-type) permissions. We can't work around that due to other limitations, for example: umask doesn't work with busybox's start-stop-daemon (at least, not as far as I know).

However, instead of relying on unix permissions, we can use the ACL functionality Synology provides.
As an example, let's say you want a user, or group of users, to have access to a file, inside a Synology shared folder.
It should be sufficient to set read/write permissions for that user or group via the shared folders permissions (e.g. the download dir you use for Deluge). Likewise, if you want to provide access for everyone and anything, set the appropriate permissions for the users group.
Permissions on the dirs are inherited by its contents by default, so you don't need to change those for the individual files.

Similarly, integration with other SynoCommunity packages (Sonarr, SickRage etc) can be done by setting rw permissions for the sc-media group. Those permissions are inherited by the files in the shared folder, and there shouldn't be problems moving stuff around.

@Dr-Bean
Copy link
Contributor

Dr-Bean commented Nov 30, 2015

Closing. If my explanation isn't clear, or you still run into issues, let us know.

@Dr-Bean Dr-Bean closed this as completed Nov 30, 2015
@dirtycajunrice
Copy link
Author

It was clear. But no matter what I did it did not change the permissions from 755. It is not an issue with transmission or rutorrent. So this is not a synology issue but a deluge issue. Although I dislike the work around I changed the deluge user and sickbeard user to root so they are considered the same account which has resolved the issue for now technically

@Dr-Bean
Copy link
Contributor

Dr-Bean commented Nov 30, 2015

My point is, you don't need to change the unix permissions...or at least, I haven't found a reason to do so.
ACL-based permissions work on a different level. If you use ACL-based permissions for a user or group, those will work regardless of the unix permissions on the same file (to a degree anyway). As I said: sickbeard is able to pick up and move a file, as long as the users group has read/write permissions via ACL, even if the unix permissions are set to 755. No need to change users around.

@kamakamadaun
Copy link

Could you please describe in detail how to make this work? I am a bit lost. My problem is that couchpotato cannot seem to unrar the files. The couchpotato user is part of the "users" group. I guess the problem is the group doesn't have write permission inside the downloaded folder.

@Cromm
Copy link

Cromm commented Nov 29, 2016

Thank you for your explanation @Dr-Bean but I too am stuck with this. Anything downloaded with deluge appears unable to be automatically or manually post-processed by sickrage (Files downloaded by deluge have permissions 644 and are owned by deluge in group users). An example of a file able to be processed by sickrage on my nas is something downloaded by SABnzb (files here have permissions 666 and are owned by sabnzbd in group usere).

I took your point about using ACL and this is what I did to change perms (just checking that I've done the right thing and also to help @kamakamadaun ):

  1. go to synology control panel > shared folder and double-click the shared folder where deluge copies completed files to.
  2. Select permissions tab
  3. Select 'local groups' from the drop-down
  4. Assign read/write perms to sc-media to allow sickrage to process files (and if you want to give wider perms then you can also assign read/write to the group users.

Is that a long-winded way of describing what you said above, @Dr-Bean ?

If so, then I have completed these steps and still am unable to post-process deluge files correctly. One thought is that, are ACL permissions assigned to the files at the point of the file's creation or are they assigned to the file at the point where perms are updated in the UI. I had assumed it was the latter as that would make most sense(!) ...in which case I don't understand why is this still not working?

@Cromm
Copy link

Cromm commented Nov 29, 2016

Just to follow this up, after I failed to set the ACL-based permissions I tried various linux permission changes to the files to get them to process automatically - none of which worked.

I then moved up the directory tree to try to make a difference. Many of the individual downloads create their own directories and by changing the ownership of these to sickbeard-custom in group users I was able to get them to auto-process. Changing the group to sc-media made no difference.

Does any of this explain why the ACL permission changes aren't doing what I think they should?

@alonalbert
Copy link

I solved this by wrapping deluged with a small shell script.
See here for for more information:

https://pastebin.com/raw/x1LLsX88

@stefan0028
Copy link

@alonalbert. I have the same problem but no idea to do this can you help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants