Linode Forum
https://forum.linode.com/

Dovecot doesn't have write permissions?
https://forum.linode.com/viewtopic.php?f=11&t=10841
Page 1 of 1

Author:  dylankarr [ Mon Feb 10, 2014 11:03 am ]
Post subject:  Dovecot doesn't have write permissions?

None of my email is being accepted, and I keep getting this error in my /var/log/mail.log:

Code:
Feb 10 09:58:35 earth dovecot: lmtp(8060, dylan@clickclickboommobile.com): Error: user dylan@clickclickboommobile.com: Initialization failed: Initializing mail storage from mail_location setting failed: mkdir(/var/mail/vhosts/clickclickboommobile.com/dylan) failed: Permission denied (euid=1001(<unknown>) egid=1001(<unknown>) missing +w perm: /var/mail/vhosts/clickclickboommobile.com, dir owned by 5000:5000 mode=0755)


I was trying to follow the linode tutorial at https://library.linode.com/email/postfix/postfix2.9.6-dovecot2.0.19-mysql#sph_postfix.

This is the mail_privileged_group line in my /etc/dovecot/conf.d/10-mail.conf
Code:
mail_privileged_group = vmail


And these are the permissions on /var/mail
Code:
drwxrwsr-x 3 vmail vmail 4096 Feb  9 01:04 /var/mail


Has anyone seen this before? Does anyone know what's wrong? I can't figure it out.

Author:  dylankarr [ Mon Feb 10, 2014 11:07 am ]
Post subject:  Re: Dovecot doesn't have write permissions?

I tried changing the line in dovecot to this:
Code:
mail_privileged_group = mail


then restarting postfix and dovecot. No change.

Author:  jebblue [ Mon Feb 10, 2014 12:27 pm ]
Post subject:  Re: Dovecot doesn't have write permissions?

Do you have a user called vmail and does it have a directory /home/vmail? I had to have that.

Author:  dylankarr [ Mon Feb 10, 2014 12:38 pm ]
Post subject:  Re: Dovecot doesn't have write permissions?

I don't, but I tried chmod 777 /var/mail and there was still no change.
I then went through and applied chmod 777 to every subdirectory manually, like this:

Code:
chmod 777 /var/mail
chmod 777 /var/mail/vhosts
chmod 777 /var/mail/vhosts/DOMAIN.com
chmod 777 /var/mail/vhosts/DOMAIN.com/USER1
chmod 777 /var/mail/vhosts/DOMAIN.com/USER2
chmod 777 /var/mail/vhosts/DOMAIN.com/USER3


And this worked! Why would that be? Shouldn't the permissions from /var/mail cascade down to all the subdirectories? Isn't that what the 's' in the permissions flags means?

Author:  jebblue [ Mon Feb 10, 2014 2:17 pm ]
Post subject:  Re: Dovecot doesn't have write permissions?

I'm using MySQL for user auth and virtual domains so I don't want to tell you wrong. Perhaps someone on here who has a similar configuration to yours can advise further.

Author:  dylankarr [ Tue Feb 11, 2014 10:39 am ]
Post subject:  Re: Dovecot doesn't have write permissions?

It looks like the problem was that all the subdirectories somehow had different permissions than /var/mail despite the s flag in the /var/mail permissions. I was able to fix the problem by going through and setting all their permissions manually.

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/