Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Issues with launching Anope (launching as root works, but not as normal user)  (Read 7220 times)

0 Members and 1 Guest are viewing this topic.

Robidu

  • Anope User
  • Offline Offline
  • Posts: 5

Greetings!

When attempting to launch Anope, I get problems depending on how the services are fired up (I'm using Linux).
If I do things as root, everything works just fine, and the log won't show any problems.
However, when I try to do the same thing as a regular user (during the startup sequence with startproc and by setting uid to "irc" and gid to "ircd" - these two do exist!) things instantaneously go haywire: Anope aborts with exit code 255 and the log says that the services have been unable to load the module relevant for my IRCd (Bahamut, that is). The returned status code is 11 (module error / file I/O error).

What could be going on here?
Logged

Charles Kingsley

  • Contributor
  • *
  • Offline Offline
  • Posts: 1405

How & where have you installed Anope?

Logged

Robidu

  • Anope User
  • Offline Offline
  • Posts: 5

Executable binaries go to /usr/local/anope and data files to /opt/anope (that's where the module dir and the likes are installed as well). This is whai I've specified at configure time.
I've installed as root (the gid of /opt/anope and all files and dirs therein is set to ircd, /usr/local/anope and everything therein is both uid and gid root, all without setuid and setgid bits).
For firing up I'm using a startup script within /etc/init.d that is supposed to launch Anope via startproc and with the -u and -g parameters specified (to set the proper uid and gid), but Anope just aborts with aforementioned error, and the startup script indicates a failure.
Logged

Charles Kingsley

  • Contributor
  • *
  • Offline Offline
  • Posts: 1405

I've not configured Anope like this before, perhaps it would be useful to post debug logs from ./services -debug -debug -debug -debug here to see if there's anything obvious happening.

I've never launched Anope via a launcher that changes the uid/gid but I have seen the I/O error normally down to permissions so hopefully some logs will help.

As for whether it's supported, that's another thing entirely.

What version of anope?
Logged

Robidu

  • Anope User
  • Offline Offline
  • Posts: 5

It's Anope 1.8.7 running on Bahamut 1.8.9.
However, what's actually boggling me is that I got that thing to work earlier, but for some reason now it doesn't want to any more.

Would a config file inspection help here as well?

As to the debug info, I'll see if I can convince Anope to display it. Would it wind up in the logs?
Logged

Charles Kingsley

  • Contributor
  • *
  • Offline Offline
  • Posts: 1405

Yes, unless you specify -nofork but that will no doubt fill your scroll back!

Logged

Robidu

  • Anope User
  • Offline Offline
  • Posts: 5

Actually, Anope doesn't display anything besides the error message that indicates the trouble on loading the bahamut module.
I've specified debug four times, but nothing else winds up in the log.
Logged

Robidu

  • Anope User
  • Offline Offline
  • Posts: 5

O.k., found the problem.
Some permissions in the dirs haven't been set correctly, but by manually correcting the problem I managed to get it to work.

Now Anope operates just fine.

As it seems the problem occurs at installation time within the directory the data files go to.

The following corrections need to be made to make it work when it has been installed as root:
$ANOPEDATADIR/modules/runtime must also be group writable
$ANOPEDATADIR/languages/* must all be group readable
$ANOPEDATADIR/logs should be group writable (otherwise nobody besides root could generate any logs)
Plus all subdirs within $ANOPEDATADIR have to be group executable (i. e. you have to be able to chdir to all of them when you aren't root but belong to the group "ircd").

Maybe the installer needs to be corrected here.

Nevertheless thank you for your help.

Robidu
Logged

katsklaw

  • Supporter
  • Anope User
  • Offline Offline
  • Posts: 537

Anope is designed to be installed and run by a normal user. Typically in the users $HOME directory and thousands of users have successfully done so without additional steps. During ./Config you areto given the option to choose which user/group permissions you want.
« Last Edit: February 04, 2012, 06:32:18 PM by katsklaw »
Logged
Pages: [1]   Go Up