Symptoms
-
Cannot log in into Roundcube on some domains:
Connection to storage server failed
Server Error: SELECT: external error occurred. Refer to server log for more information.
The following error is shown upon log in to Roundcube:
An error has occurred !
Server error: STATUS: Internal error occurred. Refer to server log for more information. [2018-11-15 16:15:30] (0.001 + 0.000 secs). -
The error like the following can be found in
/var/log/maillog
:# cannot chdir to domain dir example.com: Permission denied
courier-imaps: [email protected]: Account's mailbox directory is not owned by the correct uid or gid
dovecot: Error: service=imap, [email protected], ip=[83.157.102.43]. Mailbox INBOX.Spam: open(/var/qmail/mailnames/example.com/john.doe/Maildir/.Spam/dovecot-uidlist) failed: Permission denied
-
Permissions for the folder
/var/qmail/mailnames/example.com
or/var/qmail/Mailnames/example.com/john.doe
differ from the following:# ls -ls /var/qmail/mailnames | grep example.com
4 drwx------ 5 popuser popuser 4096 example.com# ls -la /var/qmail/mailnames/example.com/john.doe
drwx------ 6 popuser popuser 4096 Maildir
Cause
Wrong permissions for /var/qmail/Mailnames/example.com
folder or /var/qmail/Mailnames/example.com/john.doe
.
Resolution
-
Connect to the server via SSH.
-
Run the following command to fix the ownership for mailfolders:
# chown -R popuser:popuser /var/qmail/mailnames