aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: How NOT to launch Amule as root on router startup ?  (Read 4158 times)

jbc

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 13
How NOT to launch Amule as root on router startup ?
« on: July 04, 2011, 02:44:12 PM »

Hi !

I run Amule on a Asus RT-N16 router, perfectly smoothly, thanks to your help (I had a lowID due to the fact that the router required manual firewall exceptions to have highID -  solved on this forum)

Here is my question : when launching Amule from command line, it specifies that it's better not to launch it as root, for safety reasons. But in my case, Amule is launched by an init string on router startup, and it seems that it launches it as root.
So :

- Why is it better not to launch it as root ?
- Is there a mean not to do so, in this precise case ?

Thanks a lot.
JB
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: How NOT to launch Amule as root on router startup ?
« Reply #1 on: July 04, 2011, 05:51:34 PM »


Here is my question : when launching Amule from command line, it specifies that it's better not to launch it as root, for safety reasons. But in my case, Amule is launched by an init string on router startup, and it seems that it launches it as root.
So :

- Why is it better not to launch it as root ?
In desktop Linux system root isn't meant to be used. The files created by amule would be owned by root and you could have some troubles, problems integrating with firefox, etc... Of course any security bug in amule will also get root privileges.

In your case (embedded router) IMHO you can run amule as root without worrying too much.
Quote
- Is there a mean not to do so, in this precise case ?
You could create an amule user and use the sudo or su command.
Logged

jbc

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 13
Re: How NOT to launch Amule as root on router startup ?
« Reply #2 on: July 04, 2011, 11:09:59 PM »

Hi,

thanks for reply. The problem is that I have all my personnal data stored on the same disk which I use for storing amule data. This disk is mounted on the router. Do you confirm it can cause security problem in this configuration ?

Also, can you please be more precise when you say to create a user and use sudo command, please ?

Thanks
JB
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: How NOT to launch Amule as root on router startup ?
« Reply #3 on: July 05, 2011, 12:30:52 AM »

The problem is that I have all my personnal data stored on the same disk which I use for storing amule data. This disk is mounted on the router. Do you confirm it can cause security problem in this configuration ?
IMHO it should be safe as long as aMule has no security bugs. Keep in mind the mapping of users when mounting the disk, the users should match.

Quote
Also, can you please be more precise when you say to create a user and use sudo command, please ?
You can use the sudo command in order to run commands as other users. Let's say I'd like to run amule under the user btkaos, then I'll use "su btkaos amule" or something like that. But I think that's not needed in your configuration if you map the router user "root" to the actual user of the files.
Logged

lfroen

  • Guest
Re: How NOT to launch Amule as root on router startup ?
« Reply #4 on: July 05, 2011, 07:18:17 PM »

IMHO it should be safe as long as aMule has no security bugs.

Can't stop laughing here. aMule crashes are reported every other day. So yea, it should be safe, definitely. That said, keep in mind that aMule-on-router is quite rare configuration. Rare as dragon, I would say. So, I guess chances for "accidental hacking" are slim to none.
Have fun.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: How NOT to launch Amule as root on router startup ?
« Reply #5 on: July 05, 2011, 09:06:45 PM »

Methinks someone missed the "security" word, but I'm probably now going to told how all crashes are security crashes etc.
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: How NOT to launch Amule as root on router startup ?
« Reply #6 on: July 05, 2011, 09:33:35 PM »

Methinks someone missed the "security" word, but I'm probably now going to told how all crashes are security crashes etc.
Indeed I'm very interested in hearing about emule/amule security bugs, I think the only other vulnerable aMule part is the network code, and it has been there for long. Kad could have some, last known in emule is security fix of v0.47c.

Anyways it is a PITA that emule devs don't use version control, that way interesting changes to Kad and some similar parts could be easily integrated in aMule.

Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: How NOT to launch Amule as root on router startup ?
« Reply #7 on: July 05, 2011, 11:02:15 PM »

They do afaik, but it's not public.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: How NOT to launch Amule as root on router startup ?
« Reply #8 on: July 06, 2011, 12:40:06 AM »

They do afaik, but it's not public.

Good to know then, I'm sure amule is already profiting from that.

Regarding aMule's bugs, just GTK is so buggy than we will suffer some bugs, that's sure.
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: How NOT to launch Amule as root on router startup ?
« Reply #9 on: July 07, 2011, 09:19:22 PM »

emule devs don't use version control,
They do afaik, but it's not public.
Right.

Good to know then, I'm sure amule is already profiting from that.
Not really. Kry's the only one who might have access to their repo, but I'm not sure he does. Many eMule features were ported by diffing the released source to the previous version and hunting the related changes.
Logged
concordia cum veritate