Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Mar 2009 10:56:11 -0500 (CDT)
From:      Kirk Strauser <kirk@strauser.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/132778: net-im/ejabberd's cookie file has wrong ownership and perms
Message-ID:  <20090318155611.0F2103762E@kanga.honeypot.net>
Resent-Message-ID: <200903181600.n2IG0CXv016690@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         132778
>Category:       ports
>Synopsis:       net-im/ejabberd's cookie file has wrong ownership and perms
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 18 16:00:11 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Kirk Strauser
>Release:        FreeBSD 7.1-STABLE amd64
>Organization:
The Strauser Group
>Environment:
System: FreeBSD kanga.honeypot.net 7.1-STABLE FreeBSD 7.1-STABLE #0: Wed Mar 4 17:20:17 CST 2009 root@kanga.honeypot.net:/usr/obj/usr/src/sys/KANGA amd64


	
>Description:
When installing the net-im/ejabberd port, it creates a file called /usr/local/lib/erlang/lib/ejabberd-2.0.3/.erlang.cookie .  The problem is that ejabberd wants it to be owned by ejabberd:ejabberd with perms 400, but it gets owned by root:wheel with perms 444 by default.  This causes it not to start:

    # su ejabberd -c "/usr/local/sbin/ejabberdctl --node ejabberd@localhost live"
    [snip]
    {error_logger,{{2009,3,18},{10,24,44}},"inet_config: file ~s not found~n",["/usr/local/etc/ejabberd/inetrc"]}
    {error_logger,{{2009,3,18},{10,24,44}},"Cookie file /usr/local/lib/erlang/lib/ejabberd-2.0.3/.erlang.cookie must be accessible by owner only",[]} 

	
>How-To-Repeat:
Reinstall ejabberd and erlang multiple times and restore the config from tape to see why ejabberd no longer starts.  Stare at debugging output until your eyes cross and wonder why it hates you.
	
>Fix:
# chown ejabberd:ejabberd /usr/local/lib/erlang/lib/ejabberd-2.0.3/.erlang.cookie
# chmod 400 /usr/local/lib/erlang/lib/ejabberd-2.0.3/.erlang.cookie
	


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090318155611.0F2103762E>