View previous topic :: View next topic |
Author |
Message |
jamatik n00b
Joined: 20 Nov 2004 Posts: 39 Location: Berlin/Germany
|
Posted: Tue Nov 07, 2006 11:52 am Post subject: net-irc/ircservices-5.0.59 doesn't start with init-script |
|
|
After an upgrade to the new version of ircservices, it doesn't starts anymore with the provided init-script.
/etc/init.d/ircservices start
* Caching service dependencies ... [ ok ]
* Starting IRC Services ... [ !! ]
if i run the ircservices manually in the bash it starts without problems. ircservices-chk: also no problems
why? |
|
Back to top |
|
|
ConiKost Developer
Joined: 11 Jan 2005 Posts: 1365
|
Posted: Tue Nov 07, 2006 11:55 am Post subject: |
|
|
Solved!
Change in the init.d --chuid ircservices to --user ircservices --group ircservices !
Now it works. |
|
Back to top |
|
|
jamatik n00b
Joined: 20 Nov 2004 Posts: 39 Location: Berlin/Germany
|
Posted: Tue Nov 07, 2006 12:11 pm Post subject: |
|
|
easy! worked!
thx |
|
Back to top |
|
|
swegener Developer
Joined: 19 Jun 2004 Posts: 8 Location: Karlsruhe, Germany
|
Posted: Tue Nov 07, 2006 10:08 pm Post subject: |
|
|
ConiKost wrote: |
Change in the init.d --chuid ircservices to --user ircservices --group ircservices !
|
No, --chuid is correct, as we do not want to run ircservices as root. It was a bug in the ebuild, resulting in bad permission. Make sure your permissions are:
Code: |
drwxr-x--- 2 root ircservices 48 Nov 7 21:59 /etc/ircservices
-rw-r----- 1 root ircservices 37058 Nov 7 21:59 /etc/ircservices/ircservices.conf
-rw-r----- 1 root ircservices 57677 Nov 7 21:59 /etc/ircservices/modules.conf
drwxr-x--- 2 ircservices ircservices 94 Nov 7 21:59 /var/lib/ircservices
|
This will make sure, that only root can edit the config files, that ircservices (it runs as ircservices:ircservices) can only read them and noone else has access to them. _________________ Sven Wegener
Gentoo Developer
http://www.gentoo.org/ |
|
Back to top |
|
|
jamatik n00b
Joined: 20 Nov 2004 Posts: 39 Location: Berlin/Germany
|
Posted: Wed Nov 08, 2006 1:06 pm Post subject: |
|
|
Hi, changed permissions and undo changes in the init-script as you said, but it doesn't work.
Code: | #!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/net-irc/ircservices/files/ircservices.init.d,v 1.5 2006/11/05 22:23:08 swegener Exp $
depend() {
if [[ ${LOCALIRCD} = true ]]
then
need net ircd
else
need net
use ircd
fi
}
start() {
ebegin "Starting IRC Services"
start-stop-daemon --start --quiet --chuid ircservices --exec /usr/bin/ircservices -- \
-dir=/var/lib/ircservices \
-log=/var/log/ircservices/ircservices.log \
&>/dev/null
eend $?
}
stop() {
ebegin "Stopping IRC Services"
start-stop-daemon --stop --quiet --pidfile /var/lib/ircservices/ircservices.pid
eend $?
rm -f /var/lib/ircservices/ircservices.pid
}
|
Code: |
drwxr-x--- 2 root ircservices 104 8. Nov 13:55 /etc/ircservices
-rw-r----- 1 root ircservices 4115 8. Nov 13:57 /etc/ircservices/ircservices.conf
-rw-r----- 1 root ircservices 4115 6. Nov 04:33 /etc/ircservices/ircservices.conf.backup
-rw-r----- 1 root ircservices 8163 8. Nov 13:57 /etc/ircservices/modules.conf
-rw-r----- 1 root ircservices 8163 27. Jan 2006 /etc/ircservices/modules.conf.backup
drwxr-x--- 2 ircservices ircservices 4096 8. Nov 13:57 /var/lib/ircservices
-rw-r----- 1 ircservices ircservices 17 8. Nov 13:28 /var/lib/ircservices/akill.db
-rw-r----- 1 ircservices ircservices 1200 8. Nov 13:28 /var/lib/ircservices/chan.db
-rw-r----- 1 ircservices ircservices 10 8. Nov 13:28 /var/lib/ircservices/exception.db
lrwxrwxrwx 1 root root 32 8. Nov 13:57 /var/lib/ircservices/helpfiles -> /usr/share/ircservices/helpfiles
lrwxrwxrwx 1 root root 33 8. Nov 13:57 /var/lib/ircservices/ircservices.conf -> /etc/ircservices/ircservices.conf
lrwxrwxrwx 1 root root 32 8. Nov 13:57 /var/lib/ircservices/languages -> /usr/share/ircservices/languages
lrwxrwxrwx 1 root root 28 8. Nov 13:57 /var/lib/ircservices/modules -> /usr/lib/ircservices/modules
lrwxrwxrwx 1 root root 29 8. Nov 13:57 /var/lib/ircservices/modules.conf -> /etc/ircservices/modules.conf
-rw-r----- 1 ircservices ircservices 6 8. Nov 13:28 /var/lib/ircservices/news.db
-rw-r----- 1 ircservices ircservices 702 8. Nov 13:28 /var/lib/ircservices/nick.db
-rw-r----- 1 ircservices ircservices 49 8. Nov 13:28 /var/lib/ircservices/oper.db
-rw-r----- 1 ircservices ircservices 22 8. Nov 13:28 /var/lib/ircservices/sline.db
-rw-r----- 1 ircservices ircservices 192 8. Nov 13:28 /var/lib/ircservices/stats.db
|
Code: | /etc/init.d/ircservices start
* Starting IRC Services ... [ !! ]
|
|
|
Back to top |
|
|
swegener Developer
Joined: 19 Jun 2004 Posts: 8 Location: Karlsruhe, Germany
|
Posted: Wed Nov 08, 2006 2:25 pm Post subject: |
|
|
jamatik wrote: | Hi, changed permissions and undo changes in the init-script as you said, but it doesn't work. |
And please make the ircservices group the primary group of user ircservices:
Code: | usermod -g ircservices ircservices |
Old ebuilds added the user with ircservices:users, which is not good for security. I updated the ebuild to force the primary to ircservices. _________________ Sven Wegener
Gentoo Developer
http://www.gentoo.org/ |
|
Back to top |
|
|
|