1 (edited by sulliwane 2014-03-13 11:04:24)

Topic: missing +w perm //Maildir, dir owned by 0:0 mode=0755

Hi,

I encrypted /var/vmail using :

encfs ~/.vmail ~/vmail

now it's mounted. I ran :

chown -R vmail:vmail /var/vmail

and

chmod -R 0777 /var/vmail

then, when i'm trying to login to roundcube, here is what I have (see below log report)

Do you have any idea ?

Thank you a lot, a btw iredmail seems a great product !!

==== Required information ====
- iRedMail version: 0.8.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: Ubuntu 12.04
- Related log if you're reporting an issue:
Mar 13 03:49:35 imap(v@vb.fr): Error: stat(/var/vmail/vmail1/vb.fr/v/i/c/victor-2014.03.09.04.03.27//Maildir/.Drafts/new) failed: Permission denied
Mar 13 03:49:35 imap(v@vb.fr): Error: stat(/var/vmail/vmail1/vb.fr/v/i/c/victor-2014.03.09.04.03.27//Maildir/new) failed: Permission denied
Mar 13 03:49:35 imap(v@vb.fr): Error: inotify_add_watch(/var/vmail/vmail1/vb.fr/v/i/c/victor-2014.03.09.04.03.27//Maildir/.Drafts/new) failed: Permission denied
Mar 13 03:49:35 imap(v@vb.fr): Error: stat(/var/vmail/vmail1/vb.fr/v/i/c/victor-2014.03.09.04.03.27//Maildir/.Drafts/new) failed: Permission denied
Mar 13 03:49:35 imap(v@vb.fr): Error: inotify_add_watch(/var/vmail/vmail1/vb.fr/v/i/c/victor-2014.03.09.04.03.27//Maildir/new) failed: Permission denied
Mar 13 03:49:35 imap(v@vb.fr): Error: stat(/var/vmail/vmail1/vb.fr/v/i/c/victor-2014.03.09.04.03.27//Maildir/new) failed: Permission denied

====

----

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

2 (edited by sulliwane 2014-03-13 12:26:44)

Re: missing +w perm //Maildir, dir owned by 0:0 mode=0755

I rebooted my server, and I could not mount the /var/vmail encrypted folder anymore. So I decided to switch to ecryptfs and home private folder which is very convenient.

I created a soft link between /var/vmail and /home/user/Private/vmail and now things seem to work (I can connect to Roundcube, send, receive emails).

Some remarks : I used #ecryptfs-setup-private , the decryption is done everytime you login with your user. As it's a server, it's everytime you login with SSH. To avoid keeping an SSH connection, I open a screen, and let ssh user@localhost in the screen, so Private folder is not unmounted and Dovecot can access var/vmail.

To use ecryptfs, you need modprobe ecryptfs (which require a regular linux kernel, not the case with OVH servers. simple command can replace with the regular kernel).

Last question : What are the default access rights on /var/vmail and below ? because I played with rights before figuring out what was the problem, and now although everything work fine, I'd like to revert to default rights.

Thank you!

3

Re: missing +w perm //Maildir, dir owned by 0:0 mode=0755

sulliwane wrote:

Last question : What are the default access rights on /var/vmail and below ? because I played with rights before figuring out what was the problem, and now although everything work fine, I'd like to revert to default rights.

Owner/group is "vmail:vmail", permission "0700".
You should check them before you modified it.