I always had run_as_group (Found in downloads.ini, only change when mldonkey is stopped.) set to a "p2p" (a group I created), which worked fine for years.
But now, it causes the error described in the summary when set. Setting run_as_group = "" makes it work again. But of course now it doesn’t run as that group, which means a lot of other problems to me. (Like not being able to delete torrent directories over sftp, which is what I usually do, since mldonkey runs on a headless system.)
Additionally, I noticed that the ability to set the group in /etc/conf.d/mldonkey is gone, and the init script also misses the ability.
Could you please repair the destroyed functionality?
Steps to Reproduce:
1. Create a normal user called "p2p", including the home dir in /home/p2p.
2. Create a group "p2p" and add "p2p" and your own user to it.
3. chgrp p2p /home/p2p; chmod 755 /home/p2p
4. Save the attached config file in /etc/conf.d/mldonkey, so mldonkey uses the dir.
5. /etc/init.d/mldonkey start; sleep 30; /etc/init.d/mldonkey stop # creates the initial config files.
6. Edit the newly created /home/p2p/downloads.ini and set run_as_user = "p2p" and run_as_group = "p2p"
7. /etc/ini.d/mldonkey start
The end of the mldonkey.log (normally in /home/p2p/ or /var/log) should show the line
[dMain] Exception setgid failed: Operation not permitted trying to set group_gid [p2p]
Mldonkey should hang, and not be reachable via e.g. the web interface.
8. /etc/init.d/mldonkey stop
9. Set run_as_group = ""
10. /etc/init.d/mldonkey start
Now MLDonkey should start normally, and be reachable via the web interface.
MLdonkey should be able to set the group to "p2p", and start normally.
/etc/conf.d/mldonkey should have a GROUP option again, and /etc/init.d/mldonkey should use that.
Alternatively, only one way to set the user and group should suffice. Preferably settable right inside MLDonkey (downloads.ini).
In any case, since that worked for years, setting the group should still work.
I'm unable to find the GROUP option in the /etc/conf.d/mldonkey file that has been shipped since 2003. Not sure where you got that option from.
Hmm, it may be that I introduced that one myself and it never made it into portage.
But I just tested, and the problem also occurs with standard init.d and conf.d files with no GROUP option. All that is needed, is to set the options that I mentioned in downloads.ini or via the web interface. (I have to add that when I set “run_as_group”, I always also set “run_as_groupgid”.)
What is the status of this with 3.1.5-r1?
Hi. I can’t test this anymore. I’ve stopped using MLDonkey because it was badly maintained. (There still is no headless alternative :/)
Additionally, a hard disk required to run it, is currently disconnected.