[Dovecot] Permission problem with LDA and dovecot 2.2.1

Christian Wiese christian.wiese at securepoint.de
Tue May 7 19:24:07 EEST 2013


Hi Tobi,

take a look at the output from 'configure --help'.
The problem is the imo stupid default of '--localstatedir'.
----%<----------------------------------------------------------
--localstatedir=DIR     modifiable single-machine data [PREFIX/var]
----%<----------------------------------------------------------

Because you are obviously not specifying a prefix the default prefix
'/usr/local' is used, thus your localstatedir is '/usr/local/var'.

When examining the output of 'configure --help' we will also find:
----%<----------------------------------------------------------
--with-rundir=DIR       Runtime data directory
(LOCALSTATEDIR/run/dovecot)
----%<----------------------------------------------------------

I guess now you see what your problem is.

AS you are compiling dovecot on your own (not using any prebuilt
package) it is of course perfectly fine to use the default prefix
(/usr/local), but you might want to simply specify
'--localstatedir=/var' when running configure.
Then there should be no need for you symlink ;)

Hope that helps.

Cheers,
Chris

Am Tue, 07 May 2013 18:07:22 +0200
schrieb Tobi <tobster at brain-force.ch>:

> hi Ben
> 
> I tried with removing the base_dir definition from my config,
> restartet dovecot and checked with the commands you provided below:
> <<
> root at nordkap:~# doveconf -d base_dir
> base_dir = /usr/local/var/run/dovecot
> root at nordkap:~# doveconf base_dir
> base_dir = /usr/local/var/run/dovecot
> root at nordkap:~# su vmail -s /bin/sh -c "doveconf base_dir"
> base_dir = /usr/local/var/run/dovecot
>  >>
> for me it seems that all is build with /usr/local
> But after removing the symlink and restarting dovecot I get the
> errors again <<
> May  7 17:47:57 nordkap dovecot: lda: Error: userdb lookup: 
> connect(/var/run/dovecot/auth-userdb) failed: No such file or
> directory May  7 17:47:57 nordkap dovecot: lda: Fatal: Internal error
> occurred. Refer to server log for more information.
>  >>
> I checked all the configs again for any path to /usr/local and found 
> nothing (which is not commented out) that  would affect basedir
> <<
> root at nordkap:~# find /usr/local/etc/dovecot/ -type f -exec grep -H 
> /usr/local/ {} \;
> /usr/local/etc/dovecot/README:/usr/local/share/doc/dovecot/example-config/
> /usr/local/etc/dovecot/dovecot.conf:!include_try 
> /usr/local/share/dovecot/protocols.d/*.protocol
> /usr/local/etc/dovecot/dovecot.conf:#base_dir
> = /usr/local/var/run/dovecot/ /usr/local/etc/dovecot/conf.d/10-mail.conf:#mail_plugin_dir
> = /usr/local/lib/dovecot/modules
> /usr/local/etc/dovecot/conf.d/90-quota.conf:#  executable = script 
> /usr/local/bin/quota-warning.sh
>  >>
> So dovecot should use the default path /var/run if I understood you 
> right. But it does not do so in my case.
> Is there any information which I could provide to help narrow down
> the problem? On the other side it's not really important as it works
> like charm with a symlink ;-)
> 
> Cheers
> 
> tobi
> 
> > Probably your Dovecot binaries are built with a default base_dir of
> > /var/run/dovecot. What do the following give you?
> >
> >      doveconf -d base_dir        (as root)
> >      doveconf base_dir           (as root)
> >      doveconf base_dir           (as vmail:vmail)
> >
> >> Would it might be a "fix" to symlink /usr/local/var/run/dovecot to
> >> /var/run/dovecot ? Or would that break something with dovecot?
> > It probably won't break anything, but why don't you just use
> > /var/run/dovecot in the first place and take that base_dir
> > definition out of dovecot.conf?
> >
> > Ben
> >
> 



-- 
Kind regards,
Mit freundlichen Grüßen,
Christian Wiese

Follow us on Facebook:
<http://www.facebook.com/pages/Securepoint-GmbH/132451210137395>

Follow us on Twitter:
<http://twitter.com/SecurepointStat>

---------------------------------------------------------------------
Securepoint GmbH
Christian Wiese
Salzstr. 1
D-21335 Lueneburg
http://www.securepoint.de
Tele: ++49 4131 2401-0 Fax: ++49 4131 2401-50
Lueneburg HRB 1776
---------------------------------------------------------------------

CONFIDENTIALITY :
This e-mail and any attachments are confidential and may be privileged.
If you are not a named recipient, please notify the sender immediately
and do not disclose the contents to another person, use it for any
purpose or store or copy the information in any medium.

GEHEIMHALTUNGSPFLICHT :
Dieses E-Mail und alle damit verbundenen Anlagen sind vertraulich
und dürfen nur bestimmten Personen zugänglich gemacht werden.
Sofern Sie nicht zu den angegebenen Empfängern gehören, benachrichtigen
Sie bitte unverzüglich den Absender. Der Inhalt darf weder an Dritte
weitergegeben noch zu anderen Zwecken verwendet werden. Die
Informationen dürfen auch nicht auf einem Datenträger gespeichert
oder auf einen Datenträger kopiert werden.


More information about the dovecot mailing list