Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
net-irc/ircservices-5.0.59 doesn't start with init-script
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
jamatik
n00b
n00b


Joined: 20 Nov 2004
Posts: 39
Location: Berlin/Germany

PostPosted: Tue Nov 07, 2006 11:52 am    Post subject: net-irc/ircservices-5.0.59 doesn't start with init-script Reply with quote

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
View user's profile Send private message
ConiKost
Developer
Developer


Joined: 11 Jan 2005
Posts: 1365

PostPosted: Tue Nov 07, 2006 11:55 am    Post subject: Reply with quote

Solved!

Change in the init.d --chuid ircservices to --user ircservices --group ircservices !

Now it works.
Back to top
View user's profile Send private message
jamatik
n00b
n00b


Joined: 20 Nov 2004
Posts: 39
Location: Berlin/Germany

PostPosted: Tue Nov 07, 2006 12:11 pm    Post subject: Reply with quote

easy! worked!

thx
Back to top
View user's profile Send private message
swegener
Developer
Developer


Joined: 19 Jun 2004
Posts: 8
Location: Karlsruhe, Germany

PostPosted: Tue Nov 07, 2006 10:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
jamatik
n00b
n00b


Joined: 20 Nov 2004
Posts: 39
Location: Berlin/Germany

PostPosted: Wed Nov 08, 2006 1:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
swegener
Developer
Developer


Joined: 19 Jun 2004
Posts: 8
Location: Karlsruhe, Germany

PostPosted: Wed Nov 08, 2006 2:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum