Qweb - Yavuz Aydin
2005-Oct-13 11:13 UTC
[Dovecot] Possible bug: why is the owner of home-directory important?
Dear all, I am trying to migrate one of our systems to dovecot. We were using uw-imapd in black-box-mode before. Since the home-directory of a user is not unique per definition on our systems, we have kind of a different setup. As an example: I got a user, let's say user1. It's home directory is /local/web/websites/5850844095/www. This directory has the following permissions: # ls -la /local/web/websites/5850844095/|grep www drwxr-x--- 7 www-data g5850844095 4096 Oct 13 12:28 www (user1 is member of the group g5850844095) Why is logging in not working properly? See: # telnet localhost 143 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. * OK dovecot ready. 1 LOGIN user1 password 1 OK Logged in. Connection closed by foreign host. And in the logfile I see: Oct 13 13:09:47 s1 dovecot: chdir(/local/web/websites/5850844095/www) failed with uid 1020: Permission denied Oct 13 13:09:47 s1 dovecot: child 1527 (imap) returned error 89 However, when I change the permissions on the home-dir to 755, it works. The point is, none of my mailboxes (INBOX or others) are in my home-dir, so why does dovecot need my home-directory? I hope someone can help. PS1 the default_mail_env reads: default_mail_env = mbox:/local/mail/imap/%u/:INBOX=/local/mail/spool/%u PS2 This is on a Debian Sarge (3.1) system. -- Best regards, Yavuz Aydin Qweb Internet Services
Qweb - Yavuz Aydin
2005-Oct-13 11:17 UTC
[Dovecot] Re: Possible bug: why is the owner of home-directory important?
Dear all, After reading over my previous post, I realised that the owner of the home-directory is not important, but the permissions are. If I change the ownership of the home-directory to the user, and let the chmod still be 750, it still doesn't work, so there must be a problem with the permissions. So the subject of my post is not correct, I'm sorry for the inconvenience. -- Best regards, Yavuz Aydin Qweb Internet Services Citeren Qweb - Yavuz Aydin <yavuz at qweb.nl>:> Dear all, > > I am trying to migrate one of our systems to dovecot. We were using > uw-imapd in > black-box-mode before. Since the home-directory of a user is not unique per > definition on our systems, we have kind of a different setup. > > As an example: > I got a user, let's say user1. It's home directory is > /local/web/websites/5850844095/www. This directory has the following > permissions: > # ls -la /local/web/websites/5850844095/|grep www > drwxr-x--- 7 www-data g5850844095 4096 Oct 13 12:28 www > > (user1 is member of the group g5850844095) > > Why is logging in not working properly? See: > # telnet localhost 143 > Trying 127.0.0.1... > Connected to localhost. > Escape character is '^]'. > * OK dovecot ready. > 1 LOGIN user1 password > 1 OK Logged in. > Connection closed by foreign host. > > And in the logfile I see: > Oct 13 13:09:47 s1 dovecot: chdir(/local/web/websites/5850844095/www) failed > with uid 1020: Permission denied > Oct 13 13:09:47 s1 dovecot: child 1527 (imap) returned error 89 > > However, when I change the permissions on the home-dir to 755, it works. The > point is, none of my mailboxes (INBOX or others) are in my home-dir, so why > does dovecot need my home-directory? > > I hope someone can help. > > PS1 the default_mail_env reads: > default_mail_env = mbox:/local/mail/imap/%u/:INBOX=/local/mail/spool/%u > > PS2 This is on a Debian Sarge (3.1) system. > > -- > Best regards, > > Yavuz Aydin > Qweb Internet Services
Timo Sirainen
2005-Oct-16 16:14 UTC
[Dovecot] Possible bug: why is the owner of home-directory important?
On Thu, 2005-10-13 at 13:13 +0200, Qweb - Yavuz Aydin wrote:> And in the logfile I see: > Oct 13 13:09:47 s1 dovecot: chdir(/local/web/websites/5850844095/www) failed > with uid 1020: Permission denied > Oct 13 13:09:47 s1 dovecot: child 1527 (imap) returned error 89 > > However, when I change the permissions on the home-dir to 755, it works. The > point is, none of my mailboxes (INBOX or others) are in my home-dir, so why > does dovecot need my home-directory?..> PS1 the default_mail_env reads: > default_mail_env = mbox:/local/mail/imap/%u/:INBOX=/local/mail/spool/%uIn that case it would be better if userdb returned /local/mail/imap/%u as the home directory. But that's too much trouble to change, the alternative is to make it chdir to /tmp directory. The current CVS code actually already fallbacks to /tmp if chdir() to home directory failed because of permissions. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20051016/65d103fe/attachment.bin>