Initialization failed: Namespace '': mkdir(/var/www/mail) failed: Permission denied
Hi,
I'm running dovecot (v 2.2.9) on ubuntu 14.04 since a long time. I did
not change any configuration lately and I'm getting the below error
message.
/dovecot: lda(www-data): Error: user www-data: Initialization failed:
Namespace '': MKDIR(/VAR/WWW/MAIL) failed: Permission denied
(euid=33(www-data) egid=33(www-data) missing +w perm: /var/www, dir
owned by 1001:1001 mode=0755//) /
I did some troubleshooting and I don't understand where
the MKDIR(/VAR/WWW/MAIL) is coming from. Mailboxes are in /var/mail
and sending/receiving emails is working as it always did.
mail_location is still setup to be MAIL_LOCATION =
MBOX:~/MAIL:INBOX=/VAR/MAIL/%U
Why is it trying a mkdir in /var/www?
Any help would be appreciated.
Rgs,
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Thu, 26 Oct 2017, trash@skrilnetz.net wrote:
/dovecot: lda(www-data): Error: user www-data: Initialization failed: Namespace '': MKDIR(/VAR/WWW/MAIL) failed: Permission denied (euid=33(www-data) egid=33(www-data) missing +w perm: /var/www, dir owned by 1001:1001 mode=0755//) /
I did some troubleshooting and I don't understand where the MKDIR(/VAR/WWW/MAIL) is coming from. Mailboxes are in /var/mail and
^^ /var/mail contains the INBOX only
sending/receiving emails is working as it always did.
mail_location is still setup to be MAIL_LOCATION = MBOX:~/MAIL:INBOX=/VAR/MAIL/%U
Everything else is in ~/MAIL (why uppercase?)
Why is it trying a mkdir in /var/www?
Because most likely /var/www is the home directory of www-data and you've configured to use $HOME/MAIL as base directory, which is /var/www/mail
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEVAwUBWfHv6Hz1H7kL/d9rAQLoHwf+PL52wG8bqOJkfmBeezBdsjOGQN8fF07P 6SjI3PKSPjlo9w9yixRLjXRlGu6MEQj28KouT6bkJibCGMf2GebWX4zw1DiC/F5/ xwc3DU4ISCKUU/SfLGpJFz/1DDL77qtZcPyrpUzkIHz0O275dY912FyJxpPfJzi3 UiWRqmgtGmX6Uzsw0+XzR1zmFJ6o8wHyucxB6tPuy7U89JpRnayvUExN7rfB/Ogs C5pafiv08jq6Ie+HFNkyVowpluVaG2OXclyucGNly3XnY7FSznkKfDYYYrVvP35o jOtrqoToK7+Eg0qQFz9GBJfseI+iuHYBcmjOrBO/Sc1J1BWgDBm5lw== =Nn7R -----END PGP SIGNATURE-----
Quoting Steffen Kaiser <skdovecot@smail.inf.fh-brs.de>:
On Thu, 26 Oct 2017, trash@skrilnetz.net wrote:
/dovecot: lda(www-data): Error: user www-data: Initialization
failed: Namespace '': MKDIR(/VAR/WWW/MAIL) failed: Permission
denied (euid=33(www-data) egid=33(www-data) missing +w perm:
/var/www, dir owned by 1001:1001 mode=0755//) /I did some troubleshooting and I don't understand where
the MKDIR(/VAR/WWW/MAIL) is coming from. Mailboxes are in /var/mail
and^^ /var/mail contains the INBOX only
sending/receiving emails is working as it always did.
mail_location is still setup to be MAIL_LOCATION =
MBOX:~/MAIL:INBOX=/VAR/MAIL/%UEverything else is in ~/MAIL (why uppercase?)
Why is it trying a mkdir in /var/www?
Because most likely /var/www is the home directory of www-data and
you've configured to use $HOME/MAIL as base directory, which is
/var/www/mail
- -- Steffen Kaiser
I don't know where the uppercase is coming from. In the email I've
sent its lower case.
How can I fix that without changing permissions of /var/www? Where is
$HOME/MAIL configured? Why do I get this error now for the first time,
when there was no change to the system configuration?
On October 26, 2017 at 5:40 PM trash@skrilnetz.net wrote:
Quoting Steffen Kaiser <skdovecot@smail.inf.fh-brs.de>:
On Thu, 26 Oct 2017, trash@skrilnetz.net wrote:
/dovecot: lda(www-data): Error: user www-data: Initialization
failed: Namespace '': MKDIR(/VAR/WWW/MAIL) failed: Permission
denied (euid=33(www-data) egid=33(www-data) missing +w perm:
/var/www, dir owned by 1001:1001 mode=0755//) /I did some troubleshooting and I don't understand where
the MKDIR(/VAR/WWW/MAIL) is coming from. Mailboxes are in /var/mail
and^^ /var/mail contains the INBOX only
sending/receiving emails is working as it always did.
mail_location is still setup to be MAIL_LOCATION =
MBOX:~/MAIL:INBOX=/VAR/MAIL/%UEverything else is in ~/MAIL (why uppercase?)
Why is it trying a mkdir in /var/www?
Because most likely /var/www is the home directory of www-data and
you've configured to use $HOME/MAIL as base directory, which is
/var/www/mail
- -- Steffen Kaiser
I don't know where the uppercase is coming from. In the email I've
sent its lower case.How can I fix that without changing permissions of /var/www? Where is
$HOME/MAIL configured? Why do I get this error now for the first time,
when there was no change to the system configuration?
Probably someone attempted to send email via a crappy script and it's now trying to deliver to www-data.
first_valid_uid = 1001 last_valid_uid = 1001
also, doveconf -n would be useful.
Aki
Quoting Aki Tuomi <aki.tuomi@dovecot.fi>:
On October 26, 2017 at 5:40 PM trash@skrilnetz.net wrote:
Quoting Steffen Kaiser <skdovecot@smail.inf.fh-brs.de>:
On Thu, 26 Oct 2017, trash@skrilnetz.net wrote:
/dovecot: lda(www-data): Error: user www-data: Initialization failed: Namespace '': MKDIR(/VAR/WWW/MAIL) failed: Permission denied (euid=33(www-data) egid=33(www-data) missing +w perm: /var/www, dir owned by 1001:1001 mode=0755//) /
I did some troubleshooting and I don't understand where the MKDIR(/VAR/WWW/MAIL) is coming from. Mailboxes are in /var/mail and
^^ /var/mail contains the INBOX only
sending/receiving emails is working as it always did.
mail_location is still setup to be MAIL_LOCATION = MBOX:~/MAIL:INBOX=/VAR/MAIL/%U
Everything else is in ~/MAIL (why uppercase?)
Why is it trying a mkdir in /var/www?
Because most likely /var/www is the home directory of www-data and you've configured to use $HOME/MAIL as base directory, which is /var/www/mail
- -- Steffen Kaiser
I don't know where the uppercase is coming from. In the email I've sent its lower case.
How can I fix that without changing permissions of /var/www? Where is $HOME/MAIL configured? Why do I get this error now for the first time, when there was no change to the system configuration?
Probably someone attempted to send email via a crappy script and
it's now trying to deliver to www-data.first_valid_uid = 1001 last_valid_uid = 1001
also, doveconf -n would be useful. Aki
Here is doveconf -n: https://pastebin.com/raw/s6cKwHGc
On October 26, 2017 at 5:53 PM trash@skrilnetz.net wrote:
Quoting Aki Tuomi <aki.tuomi@dovecot.fi>:
On October 26, 2017 at 5:40 PM trash@skrilnetz.net wrote:
Quoting Steffen Kaiser <skdovecot@smail.inf.fh-brs.de>:
On Thu, 26 Oct 2017, trash@skrilnetz.net wrote:
/dovecot: lda(www-data): Error: user www-data: Initialization failed: Namespace '': MKDIR(/VAR/WWW/MAIL) failed: Permission denied (euid=33(www-data) egid=33(www-data) missing +w perm: /var/www, dir owned by 1001:1001 mode=0755//) /
I did some troubleshooting and I don't understand where the MKDIR(/VAR/WWW/MAIL) is coming from. Mailboxes are in /var/mail and
^^ /var/mail contains the INBOX only
sending/receiving emails is working as it always did.
mail_location is still setup to be MAIL_LOCATION = MBOX:~/MAIL:INBOX=/VAR/MAIL/%U
Everything else is in ~/MAIL (why uppercase?)
Why is it trying a mkdir in /var/www?
Because most likely /var/www is the home directory of www-data and you've configured to use $HOME/MAIL as base directory, which is /var/www/mail
- -- Steffen Kaiser
I don't know where the uppercase is coming from. In the email I've sent its lower case.
How can I fix that without changing permissions of /var/www? Where is $HOME/MAIL configured? Why do I get this error now for the first time, when there was no change to the system configuration?
Probably someone attempted to send email via a crappy script and
it's now trying to deliver to www-data.first_valid_uid = 1001 last_valid_uid = 1001
also, doveconf -n would be useful. Aki
Here is doveconf -n: https://pastebin.com/raw/s6cKwHGc
Home directory is provided by passwd userdb when present in passwd file. to override it, use
userdb { driver = passwd override_fields = home=/var/mail/%Lu }
Aki
Quoting Aki Tuomi <aki.tuomi@dovecot.fi>:
On October 26, 2017 at 5:53 PM trash@skrilnetz.net wrote:
Quoting Aki Tuomi <aki.tuomi@dovecot.fi>:
On October 26, 2017 at 5:40 PM trash@skrilnetz.net wrote:
Quoting Steffen Kaiser <skdovecot@smail.inf.fh-brs.de>:
On Thu, 26 Oct 2017, trash@skrilnetz.net wrote:
/dovecot: lda(www-data): Error: user www-data: Initialization failed: Namespace '': MKDIR(/VAR/WWW/MAIL) failed: Permission denied (euid=33(www-data) egid=33(www-data) missing +w perm: /var/www, dir owned by 1001:1001 mode=0755//) /
I did some troubleshooting and I don't understand where the MKDIR(/VAR/WWW/MAIL) is coming from. Mailboxes are in /var/mail and
^^ /var/mail contains the INBOX only
sending/receiving emails is working as it always did.
mail_location is still setup to be MAIL_LOCATION = MBOX:~/MAIL:INBOX=/VAR/MAIL/%U
Everything else is in ~/MAIL (why uppercase?)
Why is it trying a mkdir in /var/www?
Because most likely /var/www is the home directory of www-data and you've configured to use $HOME/MAIL as base directory, which is /var/www/mail
- -- Steffen Kaiser
I don't know where the uppercase is coming from. In the email I've sent its lower case.
How can I fix that without changing permissions of /var/www? Where is $HOME/MAIL configured? Why do I get this error now for the first time, when there was no change to the system configuration?
Probably someone attempted to send email via a crappy script and it's now trying to deliver to www-data.
first_valid_uid = 1001 last_valid_uid = 1001
also, doveconf -n would be useful. Aki
Here is doveconf -n: https://pastebin.com/raw/s6cKwHGc
Home directory is provided by passwd userdb when present in passwd
file. to override it, useuserdb { driver = passwd override_fields = home=/var/mail/%Lu } Aki
Thanks for the quick replies.
I've checked, and the user database information is stored in
/home/user/mail/ for every user.
That works as expected without changing anything. I have still the
same question…
Why is it trying to write to /var/www when the mailbox is in
/var/mail/ and the user data in /home/user/mail/?
Quoting trash@skrilnetz.net:
Quoting Aki Tuomi <aki.tuomi@dovecot.fi>:
On October 26, 2017 at 5:53 PM trash@skrilnetz.net wrote:
Quoting Aki Tuomi <aki.tuomi@dovecot.fi>:
On October 26, 2017 at 5:40 PM trash@skrilnetz.net wrote:
Quoting Steffen Kaiser <skdovecot@smail.inf.fh-brs.de>:
On Thu, 26 Oct 2017, trash@skrilnetz.net wrote:
/dovecot: lda(www-data): Error: user www-data: Initialization failed: Namespace '': MKDIR(/VAR/WWW/MAIL) failed: Permission denied (euid=33(www-data) egid=33(www-data) missing +w perm: /var/www, dir owned by 1001:1001 mode=0755//) /
I did some troubleshooting and I don't understand where the MKDIR(/VAR/WWW/MAIL) is coming from. Mailboxes are in /var/mail and
^^ /var/mail contains the INBOX only
sending/receiving emails is working as it always did.
mail_location is still setup to be MAIL_LOCATION = MBOX:~/MAIL:INBOX=/VAR/MAIL/%U
Everything else is in ~/MAIL (why uppercase?)
Why is it trying a mkdir in /var/www?
Because most likely /var/www is the home directory of www-data and you've configured to use $HOME/MAIL as base directory, which is /var/www/mail
- -- Steffen Kaiser
I don't know where the uppercase is coming from. In the email I've sent its lower case.
How can I fix that without changing permissions of /var/www? Where is $HOME/MAIL configured? Why do I get this error now for the first time, when there was no change to the system configuration?
Probably someone attempted to send email via a crappy script and it's now trying to deliver to www-data.
first_valid_uid = 1001 last_valid_uid = 1001
also, doveconf -n would be useful. Aki
Here is doveconf -n: https://pastebin.com/raw/s6cKwHGc
Home directory is provided by passwd userdb when present in passwd
file. to override it, useuserdb { driver = passwd override_fields = home=/var/mail/%Lu } Aki
Thanks for the quick replies. I've checked, and the user database information is stored in
/home/user/mail/ for every user. That works as expected without changing anything. I have still the
same question… Why is it trying to write to /var/www when the mailbox is in
/var/mail/ and the user data in /home/user/mail/?
Ok, got it!
It's trying to deliver to user www-data and because of below line in
passwd, it attempts to create the dir in www, right?
/www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin/
How can I find out with email is causing the error message?
On October 26, 2017 at 7:10 PM trash@skrilnetz.net wrote:
Quoting trash@skrilnetz.net:
Quoting Aki Tuomi <aki.tuomi@dovecot.fi>:
On October 26, 2017 at 5:53 PM trash@skrilnetz.net wrote:
Quoting Aki Tuomi <aki.tuomi@dovecot.fi>:
On October 26, 2017 at 5:40 PM trash@skrilnetz.net wrote:
Quoting Steffen Kaiser <skdovecot@smail.inf.fh-brs.de>:
On Thu, 26 Oct 2017, trash@skrilnetz.net wrote:
/dovecot: lda(www-data): Error: user www-data: Initialization failed: Namespace '': MKDIR(/VAR/WWW/MAIL) failed: Permission denied (euid=33(www-data) egid=33(www-data) missing +w perm: /var/www, dir owned by 1001:1001 mode=0755//) /
I did some troubleshooting and I don't understand where the MKDIR(/VAR/WWW/MAIL) is coming from. Mailboxes are in /var/mail and
^^ /var/mail contains the INBOX only
sending/receiving emails is working as it always did.
mail_location is still setup to be MAIL_LOCATION = MBOX:~/MAIL:INBOX=/VAR/MAIL/%U
Everything else is in ~/MAIL (why uppercase?)
Why is it trying a mkdir in /var/www?
Because most likely /var/www is the home directory of www-data and you've configured to use $HOME/MAIL as base directory, which is /var/www/mail
- -- Steffen Kaiser
I don't know where the uppercase is coming from. In the email I've sent its lower case.
How can I fix that without changing permissions of /var/www? Where is $HOME/MAIL configured? Why do I get this error now for the first time, when there was no change to the system configuration?
Probably someone attempted to send email via a crappy script and it's now trying to deliver to www-data.
first_valid_uid = 1001 last_valid_uid = 1001
also, doveconf -n would be useful. Aki
Here is doveconf -n: https://pastebin.com/raw/s6cKwHGc
Home directory is provided by passwd userdb when present in passwd
file. to override it, useuserdb { driver = passwd override_fields = home=/var/mail/%Lu } Aki
Thanks for the quick replies. I've checked, and the user database information is stored in
/home/user/mail/ for every user. That works as expected without changing anything. I have still the
same question… Why is it trying to write to /var/www when the mailbox is in
/var/mail/ and the user data in /home/user/mail/?
Ok, got it! It's trying to deliver to user www-data and because of below line in
passwd, it attempts to create the dir in www, right? /www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin/ How can I find out with email is causing the error message?
If you are using postfix, try mailq
Aki
Quoting Aki Tuomi <aki.tuomi@dovecot.fi>:
On October 26, 2017 at 7:10 PM trash@skrilnetz.net wrote:
Quoting trash@skrilnetz.net:
Quoting Aki Tuomi <aki.tuomi@dovecot.fi>:
On October 26, 2017 at 5:53 PM trash@skrilnetz.net wrote:
Quoting Aki Tuomi <aki.tuomi@dovecot.fi>:
On October 26, 2017 at 5:40 PM trash@skrilnetz.net wrote:
Quoting Steffen Kaiser <skdovecot@smail.inf.fh-brs.de>:
On Thu, 26 Oct 2017, trash@skrilnetz.net wrote:
/dovecot: lda(www-data): Error: user www-data: Initialization failed: Namespace '': MKDIR(/VAR/WWW/MAIL) failed: Permission denied (euid=33(www-data) egid=33(www-data) missing +w perm: /var/www, dir owned by 1001:1001 mode=0755//) /
I did some troubleshooting and I don't understand where the MKDIR(/VAR/WWW/MAIL) is coming from. Mailboxes are in /var/mail and
^^ /var/mail contains the INBOX only
sending/receiving emails is working as it always did.
mail_location is still setup to be MAIL_LOCATION = MBOX:~/MAIL:INBOX=/VAR/MAIL/%U
Everything else is in ~/MAIL (why uppercase?)
Why is it trying a mkdir in /var/www?
Because most likely /var/www is the home directory of www-data and you've configured to use $HOME/MAIL as base directory, which is /var/www/mail
- -- Steffen Kaiser
I don't know where the uppercase is coming from. In the email I've sent its lower case.
How can I fix that without changing permissions of /var/www? Where is $HOME/MAIL configured? Why do I get this error now for the first time, when there was no change to the system configuration?
Probably someone attempted to send email via a crappy script and it's now trying to deliver to www-data.
first_valid_uid = 1001 last_valid_uid = 1001
also, doveconf -n would be useful. Aki
Here is doveconf -n: https://pastebin.com/raw/s6cKwHGc
Home directory is provided by passwd userdb when present in passwd file. to override it, use
userdb { driver = passwd override_fields = home=/var/mail/%Lu } Aki
Thanks for the quick replies. I've checked, and the user database information is stored in /home/user/mail/ for every user. That works as expected without changing anything. I have still the same question… Why is it trying to write to /var/www when the mailbox is in /var/mail/ and the user data in /home/user/mail/?
Ok, got it! It's trying to deliver to user www-data and because of below line in passwd, it attempts to create the dir in www, right? /www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin/[1] How can I find out with email is causing the error message?
If you are using postfix, try mailq Aki
Resolved!
I've added an alias (/etc/aliases) to deliver mail for www-data to
user admin. I then delivered all messages by running: postqueue -f
I've checked the messages and it seems to be that a wordpress plugin
was sending to www-data.
Thanks for the help, getting me in the right direction.
Links:
[1]
On October 26, 2017 at 6:40 PM trash@skrilnetz.net wrote:
Quoting Aki Tuomi <aki.tuomi@dovecot.fi>:
On October 26, 2017 at 5:53 PM trash@skrilnetz.net wrote:
Quoting Aki Tuomi <aki.tuomi@dovecot.fi>:
On October 26, 2017 at 5:40 PM trash@skrilnetz.net wrote:
Quoting Steffen Kaiser <skdovecot@smail.inf.fh-brs.de>:
On Thu, 26 Oct 2017, trash@skrilnetz.net wrote:
/dovecot: lda(www-data): Error: user www-data: Initialization failed: Namespace '': MKDIR(/VAR/WWW/MAIL) failed: Permission denied (euid=33(www-data) egid=33(www-data) missing +w perm: /var/www, dir owned by 1001:1001 mode=0755//) /
I did some troubleshooting and I don't understand where the MKDIR(/VAR/WWW/MAIL) is coming from. Mailboxes are in /var/mail and
^^ /var/mail contains the INBOX only
sending/receiving emails is working as it always did.
mail_location is still setup to be MAIL_LOCATION = MBOX:~/MAIL:INBOX=/VAR/MAIL/%U
Everything else is in ~/MAIL (why uppercase?)
Why is it trying a mkdir in /var/www?
Because most likely /var/www is the home directory of www-data and you've configured to use $HOME/MAIL as base directory, which is /var/www/mail
- -- Steffen Kaiser
I don't know where the uppercase is coming from. In the email I've sent its lower case.
How can I fix that without changing permissions of /var/www? Where is $HOME/MAIL configured? Why do I get this error now for the first time, when there was no change to the system configuration?
Probably someone attempted to send email via a crappy script and it's now trying to deliver to www-data.
first_valid_uid = 1001 last_valid_uid = 1001
also, doveconf -n would be useful. Aki
Here is doveconf -n: https://pastebin.com/raw/s6cKwHGc
Home directory is provided by passwd userdb when present in passwd
file. to override it, useuserdb { driver = passwd override_fields = home=/var/mail/%Lu } Aki
Thanks for the quick replies. I've checked, and the user database information is stored in
/home/user/mail/ for every user. That works as expected without changing anything. I have still the
same question… Why is it trying to write to /var/www when the mailbox is in
/var/mail/ and the user data in /home/user/mail/?
So you are saying that the home directory field, in /etc/passwd, for user www-data is set to /home/www-data/mail ?
You should consider setting
first_valid_uid = 1000
Aki
Quoting Aki Tuomi <aki.tuomi@dovecot.fi>:
On October 26, 2017 at 6:40 PM trash@skrilnetz.net wrote:
Quoting Aki Tuomi <aki.tuomi@dovecot.fi>:
On October 26, 2017 at 5:53 PM trash@skrilnetz.net wrote:
Quoting Aki Tuomi <aki.tuomi@dovecot.fi>:
On October 26, 2017 at 5:40 PM trash@skrilnetz.net wrote:
Quoting Steffen Kaiser <skdovecot@smail.inf.fh-brs.de>:
On Thu, 26 Oct 2017, trash@skrilnetz.net wrote:
/dovecot: lda(www-data): Error: user www-data: Initialization failed: Namespace '': MKDIR(/VAR/WWW/MAIL) failed: Permission denied (euid=33(www-data) egid=33(www-data) missing +w perm: /var/www, dir owned by 1001:1001 mode=0755//) /
I did some troubleshooting and I don't understand where the MKDIR(/VAR/WWW/MAIL) is coming from. Mailboxes are in /var/mail and
^^ /var/mail contains the INBOX only
sending/receiving emails is working as it always did.
mail_location is still setup to be MAIL_LOCATION = MBOX:~/MAIL:INBOX=/VAR/MAIL/%U
Everything else is in ~/MAIL (why uppercase?)
Why is it trying a mkdir in /var/www?
Because most likely /var/www is the home directory of www-data and you've configured to use $HOME/MAIL as base directory, which is /var/www/mail
- -- Steffen Kaiser
I don't know where the uppercase is coming from. In the email I've sent its lower case.
How can I fix that without changing permissions of /var/www? Where is $HOME/MAIL configured? Why do I get this error now for the first time, when there was no change to the system configuration?
Probably someone attempted to send email via a crappy script and it's now trying to deliver to www-data.
first_valid_uid = 1001 last_valid_uid = 1001
also, doveconf -n would be useful. Aki
Here is doveconf -n: https://pastebin.com/raw/s6cKwHGc
Home directory is provided by passwd userdb when present in passwd file. to override it, use
userdb { driver = passwd override_fields = home=/var/mail/%Lu } Aki
Thanks for the quick replies. I've checked, and the user database information is stored in /home/user/mail/ for every user. That works as expected without changing anything. I have still the same question… Why is it trying to write to /var/www when the mailbox is in /var/mail/ and the user data in /home/user/mail/?
So you are saying that the home directory field, in /etc/passwd, for
user www-data is set to /home/www-data/mail ?You should consider setting
first_valid_uid = 1000 Aki
No, it's /var/www.
It's trying to deliver to user www-data and because of below line in
passwd, it attempts to create the dir in www, right?
/www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin/[1]
How can I find out with email is causing the error message?
Links:
[1]
participants (3)
-
Aki Tuomi
-
Steffen Kaiser
-
trash@skrilnetz.net