[Dovecot] pop3 gives a permission denied error on chdir

Kenneth Gonsalves lawgon at au-kbc.org
Wed May 20 14:28:22 EEST 2009


On Wednesday 20 May 2009 01:20:37 you wrote:
> On Tue, 2009-05-19 at 13:35 +0530, Kenneth Gonsalves wrote:
> > May 19 09:16:10 greenchilly dovecot: chdir(/home/vmail/example.com/john)
> > failed with uid 5000: Permission denied
>
> ..
>
> > I have looked at the archives and see that the problem has been reported
> > before, but cannot find any solution. Dovecot as LDA has no problem
> > accessing and writing mails to the directory as UID 5000. I suspect that
> > it is trying to access some other directory and the error message is
> > misleading. The directory /home/vmail/example.com/john is owned by user
> > vmail with UID 5000. Any clues?
>
> And all the directories before that are also available for that user?

yes
> Are you using NFS? Are you using SELinux or something? 

no
> Anyway that
> chdir() syscall really failed with that error message. The reason for
> that is less clear then.. v1.1+ would give a much nicer error message
> here telling exactly what is wrong..

I have installed version 1.1.13, here is the mail log:

May 20 10:33:54 greenchilly dovecot: auth(default): new auth connection: 
pid=1181
May 20 10:34:07 greenchilly dovecot: auth(default): client in: 
AUTH^I1^IPLAIN^Iservice=pop3^Isecured^Ilip=127.0.0.1^Irip=127.0.0.1^Ilport=110^Irport=42418^Iresp=<hidden>
May 20 10:34:07 greenchilly dovecot: auth-worker(default): 
pam(john at example.com,127.0.0.1): lookup service=dovecot
May 20 10:34:07 greenchilly dovecot: auth-worker(default): 
pam(john at example.com,127.0.0.1): #1/1 style=1 msg=Password:
May 20 10:34:10 greenchilly dovecot: auth-worker(default): 
pam(john at example.com,127.0.0.1): unknown user
May 20 10:34:10 greenchilly dovecot: auth(default): 
sql(john at example.com,127.0.0.1): query: SELECT email as user, passwd as 
password FROM view_users WHERE email='john at example.com';
May 20 10:34:10 greenchilly dovecot: auth(default): client out: 
OK^I1^Iuser=john at example.com
May 20 10:34:10 greenchilly dovecot: auth(default): master in: 
REQUEST^I3^I1166^I1
May 20 10:34:10 greenchilly dovecot: auth(default): 
passwd(john at example.com,127.0.0.1): lookup
May 20 10:34:10 greenchilly dovecot: auth(default): 
passwd(john at example.com,127.0.0.1): unknown user
May 20 10:34:10 greenchilly dovecot: auth(default): master out: 
USER^I3^Ijohn at example.com^Iuid=5000^Igid=5000^Ihome=/home/vmail/example.com/john
May 20 10:34:10 greenchilly dovecot: Fatal: 
chdir(/home/vmail/example.com/john) failed with uid 5000: Permission denied
May 20 10:34:10 greenchilly dovecot: child 1182 (pop3) returned error 89 
(Fatal failure)
May 20 10:34:10 greenchilly dovecot: pop3-login: Login: 
user=<john at example.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured

and here is the session info:

lawgon at greenchilly:~$ telnet localhost pop3
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
+OK Dovecot ready.
user john at example.com
+OK
pass summersun
+OK Logged in.
Connection closed by foreign host.

-- 
regards
Kenneth Gonsalves
Associate
NRC-FOSS
http://nrcfosshelpline.in/web/



More information about the dovecot mailing list