Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 388879 - net-p2p/mldonkey-3.1.0: Exception setgid failed: Operation not permitted trying to set group_gid
Summary: net-p2p/mldonkey-3.1.0: Exception setgid failed: Operation not permitted tryi...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at if you want to take care of it
Depends on:
Reported: 2011-10-29 19:20 UTC by Navid Zamani
Modified: 2016-05-10 01:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Navid Zamani 2011-10-29 19:20:17 UTC
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?

Reproducible: Always

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
Actual Results:  
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.

Expected Results:  
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.
Comment 1 Raúl Porcel (RETIRED) gentoo-dev 2011-11-19 17:55:29 UTC
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.
Comment 2 Navid Zamani 2011-11-21 00:31:52 UTC
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”.)
Comment 3 Pacho Ramos gentoo-dev 2016-05-07 09:05:04 UTC
What is the status of this with 3.1.5-r1?
Comment 4 Navid Zamani 2016-05-10 01:02:21 UTC
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.