Group permissions wrong in imap folder


Verified User
I was unable to create maps in roundcube. Investigating this I discovered that the group permissions are wrong in folder /home/<user>/imap. Permissions were <user>:<user>
By analyzing a second server I found that permissions should be <user>:mail

I used chgrp -hR mail /home/<user>/imap/ to set the correct permissions. This fixed my problem.

I don't know what caused the wrong permissions in the first place. I suppose it is my fault, because I maintain 2 similar servers and configuration is almost identical.

If it is for some reason a bug in DA or CB2.0 I thought I should mention it here.

Question: Is it save to assume that all files in /home/<user>/imap/ should have <user>:mail permissions? Or are there exceptions?


Super Moderator
You may want to use this ;)
Thu Oct 20 15:34:24 CEST 2016 : /usr/local/directadmin/scripts/

DirectAdmin File Permission/Ownership script

  /usr/local/directadmin/scripts/ all

  /usr/local/directadmin/scripts/ da_files
  /usr/local/directadmin/scripts/ user_homes
  /usr/local/directadmin/scripts/ mysql
  /usr/local/directadmin/scripts/ email
  /usr/local/directadmin/scripts/ logs
  /usr/local/directadmin/scripts/ etc_configs

  /usr/local/directadmin/scripts/ maildir <user> <path/Maildir>
  /usr/local/directadmin/scripts/ set_user_home <user>


Verified User
Thanks for pointing to

Is this the right way?

/usr/local/directadmin/scripts/ maildir someuser /home/someuser/imap/


Super Moderator
I would rather go with:
user_homes or email or even all

Just to be sure i would prefer to use the "all", so everything will be set as it should.

Best regards


Verified User
/usr/local/directadmin/scripts/ all

Worked perfectly. Thanks.

Oeps, spoke to soon!

All sites now report:
Unable to establish connection to MySQL
2002 : Permission denied

Update a simple stop and start of mysql fixed the error. :)
Last edited: