Group permissions wrong in imap folder

Wanabo

Verified User
Joined
Jan 19, 2013
Messages
339
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?
 
You may want to use this ;)
Code:
>/usr/local/directadmin/scripts/set_permissions.sh
***********************************************
Thu Oct 20 15:34:24 CEST 2016 : /usr/local/directadmin/scripts/set_permissions.sh

DirectAdmin File Permission/Ownership script

Usage:
  /usr/local/directadmin/scripts/set_permissions.sh all

  /usr/local/directadmin/scripts/set_permissions.sh da_files
  /usr/local/directadmin/scripts/set_permissions.sh user_homes
  /usr/local/directadmin/scripts/set_permissions.sh mysql
  /usr/local/directadmin/scripts/set_permissions.sh email
  /usr/local/directadmin/scripts/set_permissions.sh logs
  /usr/local/directadmin/scripts/set_permissions.sh etc_configs

internal:
  /usr/local/directadmin/scripts/set_permissions.sh maildir <user> <path/Maildir>
  /usr/local/directadmin/scripts/set_permissions.sh set_user_home <user>

Regards
 
Thanks for pointing to set_permissions.sh

Is this the right way?

/usr/local/directadmin/scripts/set_permissions.sh maildir someuser /home/someuser/imap/example.com/someemailaccount
 
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
 
/usr/local/directadmin/scripts/set_permissions.sh 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:
Back
Top