Run the Deluge plugin as root

  • I'm trying to run the Deluge plugin as root. The location I'm tryign to store the files to does not have access for the deluge-daemon user. I tried editing the /etc/init.d/deluge-daemon to use the DELUGED_USER="root" but when I do that and then try and start the service it does not return an error but then when I try and access the WEBGUI, I can't connect.


    Anyone have any thoughts? Do I have to configure another file somewhere? I tried googling and all the guides seem to have info on how to use a deluge-daemon user and I tried reversing that but it did not work. Any assistance is appreciated.

  • I an guessing the folder under /root/.config/deluge has not been initialized, with some basic configuration for Deluge.


    There is a deluge folder under /root/.config/ however it looks like Deluge is not using that folder it looks like it is using the core.config file from /home/deluge-daemon/.config/deluge/core.config that file has all my settings in it.


    BTW Why do you need to run as root? Can't you solve this with some basic posix permissions?


    I'm not sure what a posix permission is, googling it right after I write this.
    I have OMV running on my server (alpha). Alpha has my samba share all set as //aplha/archive01/ (need access from windows also) and I have a user with read/write permissions and lastly, alpha is running the virtualbox plugin. In the VB plugin I am running another server (beta). On beta I am using the remote share pluging to map back to //alpha/archive/ as /media/1234-123123-123123/archive01. I created a link by doing a ln -s /media/1234-123123-123123/archive01/ /media/ so I can access it by using it as /media/archive01. I have deluge trying to store files to /media/archive01/deluge but it is failing as the deluge-daemon user has no rights to that share. Do I have to create a deluge-daemon on Alpha and give them access to //aplha/archive01? I had this same problem when running NZBGet and I was able to fix that by editing the /etc/init.d/nzbget to use the root user.


    I tired asking this to the Deluge folks but they say I need to talk to the person who setup the plugin as they don not know what the plugin does or creates.

  • Zitat

    Did you try adding the deluged to the users group???


    I'll try anything. Should I do that on the main box or the VM?


    Zitat

    Problem is the remote share plugin does not give extra options to use uid and gid. All goes to root:root


    Which is why I thought running Deluge as root would be easiest.

    • Offizieller Beitrag

    If you installed deluge with the plugin, then it already runs in the users group.


    Try this, reset permissions in the share in alpha (shared folder section, next tab).


    Then share it with nfs server as RW and add this extra options


    subtree_check,insecure,all_squash,anongid=100


    Then in beta server use the remote share plugin with nfs to mount, the path should be /export/sharename, select the target share folder where you want it mount in beta
    Leave rest as default


    Now go to the mounted path and try sudo -u deluge-daemon touch test a test file should appear owned by user nobody.


    That means you're good for running deluge now as deluge-daemon.


    I did not use samba because that would mean editing the file in fstab, that would get rewritten every time you made a change in filesystem or the remote share.

  • I did not notice before he was trying to save to a remote share.... I tell you, I don't understand why you people using torrents do no have scripts to handle this stuff. I would have all downloads go to a temp folder that works fine with the torrent service and then a script to handle post download. You could even have a cron job that checks the temp download folder for content and executes a script if anything is there. The script could adjust chown/chmod and move to a temp folder with same attributes as final destination. I think for initial download you could have multiple download folders for type of content. Then depending on what download folder the script could move to final destination that is appropriate. All user should have to do is adjust paths in script.


  • Now go to the mounted path and try sudo -u deluge-daemon touch test a test file should appear owned by user nobody.


    Any way to get this to make the owner as root:root, I don't have a nobody user and all my other stuff is not working as it can't access the files that deluge drops unless I go in and chmod them. Sure I can create a script to chmod them and run a cron job and all that but would rather just drop the files with the proper user/permissions.


    I do apprecate all the assistance but it really seems to be a hell of a work around instead of simply running the deluge as root.

  • I cannot really help in these matters with torrenting. I just try to give ideas. You should always try to run services as a non root users. If not I think it would be better to run them in a Docker container or a vm.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!