1 (edited by rhinolt 2020-11-07 23:50:13)

Topic: issue with directory operation permission

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.1 MARIADB edition.
- Deployed with iRedMail Easy or the downloadable installer?:downloadable installer
- Linux/BSD distribution name and version: centos 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Web server (Apache or Nginx):nginx
- Manage mail accounts with iRedAdmin-Pro? maybe
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

after installation and add user account on iredadmin, i opened roundcube with user 'test2',and clicked mailbox,then receieved 'Server error:SELECT: Internal error occurred. Refer to server log for more information.'

then i checked /var/log/dovecot and some error messages are on imap.log and lda.log





imap.log:

Nov  7 17:34:01 Xxxx dovecot: imap(test2@abcd.com): Error: chdir(/var/vmail/vmail1/abcd.com/t/e/s/test2-2020.11.07.15.31.07//) failed: Permission denied (euid=2000(<unknown>) egid=2000(<unknown>) missing +x perm: /var/vmail/vmail1, dir owned by 5000:5000 mode=0700)
Nov  7 17:34:01 Xxxx dovecot: imap(test2@abcd.com): Error: dict-client: Commit failed: net_connect_unix(/var/run/dovecot/dict) failed: Permission denied (euid=2000(<unknown>) egid=2000(<unknown>) missing +r perm: /var/run/dovecot/dict, we're not in group 5000(vmail), dir owned by 0:97 mode=0755) (reply took 0.000 secs)
Nov  7 17:34:01 Xxxx dovecot: imap(test2@abcd.com): Error: last_login_dict: Failed to write value for user test2@abcd.com
Nov  7 17:34:01 Xxxx dovecot: imap(test2@abcd.com): Error: stats: open(/var/run/dovecot/stats-mail) failed: Permission denied
Nov  7 17:34:01 Xxxx dovecot: imap(test2@abcd.com): Error: Namespace '': stat(/var/vmail/vmail1/abcd.com/t/e/s/test2-2020.11.07.15.31.07//Maildir) failed: Permission denied (euid=2000(<unknown>) egid=2000(<unknown>) missing +x perm: /var/vmail/vmail1, dir owned by 5000:5000 mode=0700)
Nov  7 17:34:01 Xxxx dovecot: imap(test2@abcd.com): Namespace '': stat(/var/vmail/vmail1/abcd.com/t/e/s/test2-2020.11.07.15.31.07//Maildir) failed: Permission denied (euid=2000(<unknown>) egid=2000(<unknown>) missing +x perm: /var/vmail/vmail1, dir owned by 5000:5000 mode=0700) in=0 out=392


lda.log:

Nov  7 17:34:25 Xxxx dovecot: lda(postmaster@abcd.com): Fatal: setgid(2000 from mail_gid setting) failed with euid=5000(vmail), gid=5000(vmail), egid=5000(vmail): Operation not permitted (This binary should probably be called with process group set to 2000 instead of 5000(vmail))



how to fix it?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: issue with directory operation permission

Okey,i fixed it by myself
just change uid(s) in/etc/dovecot.conf,then no such errors popup anymore

THUS,other issue appears,i may need another post for help

say,this site is dead as a doornail

3

Re: issue with directory operation permission

You'd better use the default uid/gid (2000:2000) for vmail user/group and fix directory owner/group/permission instead, it will be helpful if you need to sync/copy mailboxes to another iRedMail server (maybe in the future).