[SOLVED] Dovecot pop3 Server, cannot chown, mkdir and open /INBOX
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Dovecot pop3 Server, cannot chown, mkdir and open /INBOX
Dear All,
I have installed a new Dovecot 2.0.11 that comes with Fedora 14.
(I used to run Dovecot 1.2.9 of Fedora 12 that does not have this problem.)
I configure the Dovecot as followings:
disable_plaintext_auth = no
# Accept plain text authentication
mail_location = mbox:~/mail:INBOX=/var/mail/%u
# mbox at /home/someUser/mail
# INBOX at /var/mail/someUser
I then telnet localhost 110.
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK Dovecot ready.
user someUser
+OK
pass secret
-ERR [IN-USE] Couldn't open INBOX: Internal error occurred. Refer to server log for more information. [2011-05-05 16:40:29]
Connection closed by foreign host.
From the /var/log/maillog file, I got this log.
......
May 5 14:30:48 server5 dovecot: pop3-login: Login: user=<someUser>, method=PLAIN, rip=192.168.1.42, lip=192.168.1.7, mpid=12667
May 5 14:30:48 server5 dovecot: pop3(someUser): Error: chown(/home/someUser/mail/.imap/INBOX, -1, 12(mail)) failed: Operation not permitted (egid=501(someUser), group based on /var/mail/someUser)
May 5 14:30:48 server5 dovecot: pop3(someUser): Error: mkdir(/home/someUser/mail/.imap/INBOX) failed: Operation not permitted
May 5 14:30:48 server5 dovecot: pop3(someUser): Error: Couldn't open INBOX: Internal error occurred. Refer to server log for more information. [2011-05-05 14:30:48]
May 5 14:30:48 server5 dovecot: pop3(someUser): Couldn't open INBOX top=0/0, retr=0/0, del=0/0, size=0
I went to /home/someUser/mail and see some directories added: /home/someUser/mail
/home/someUser/mail/.imap
From the log file above, the errors are:
Error: chown(/home/someUser/mail/.imap/INBOX, -1, 12(mail))
Error: mkdir(/home/someUser/mail/.imap/INBOX)
Error: Couldn't open INBOX
My questions are:
If /mail and /.imap directories can be made, why can't it make the INBOX directory and hence the INBOX (Operation not permitted)?
Is it a file/directory permission problem?
Is it a user problem?
Is it a Dovecot configuration problem?
Dovecot pop3 Server, cannot chown, mkdir and open /INBOX
Dear Centos123 and All,
I made all the configurations as root user.
I made the telnet session as someUser (I have also tried root, but it doesn't help).
Dovecot is a service in /etc/init.d/rc.d/dovecot, I don't know what user it is running. (mail, dovecot, root, someUser; I have no idea.)
Yes, I have already specified the protocol in /cet/dovecot/dovecot.conf: protocols = pop3 imap
I was going to write about the same problem. This got me over the hump:
chmod 0600 /var/spool/mail/*
All my user's mailboxes used to be group=mail mode=0660. I think these settings were left over from Solaris' mail.local: I can't reproduce these permissions now, even for new mailboxes. Maybe it's because the spool directory is now mode=1777 (not g+s mail). Not too keen on these permissions either, but it seems to work.
Dovecot seems to transfer group permissions of the mailbox to its corresponding cache. If it can't set group ownership, you get the fatal error message above. If the original mailbox is mode 0600, dovecot is smart enough not to set group ownership.
I couldn't find this information: shouldn't it be documented here?
Thanks for the help from all.
Regards,
Anthony Pong
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.