Results 1 to 5 of 5

Thread: Group permissions wrong in imap folder

  1. #1
    Join Date
    Jan 2013
    Posts
    162

    Group permissions wrong in imap folder

    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?
    Probe my IP

  2. #2
    Join Date
    Oct 2004
    Location
    A Coruña, Spain
    Posts
    6,786
    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
    SeLLeRoNe - Andrea Iannucci
    Head of Managed Service - Senior DevOps Engineer
    If you need my support write me an E-Mail to Support@CrazyNetwork.it

  3. #3
    Join Date
    Jan 2013
    Posts
    162
    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
    Probe my IP

  4. #4
    Join Date
    Oct 2004
    Location
    A Coruña, Spain
    Posts
    6,786
    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
    SeLLeRoNe - Andrea Iannucci
    Head of Managed Service - Senior DevOps Engineer
    If you need my support write me an E-Mail to Support@CrazyNetwork.it

  5. #5
    Join Date
    Jan 2013
    Posts
    162
    /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 by Wanabo; 10-22-2016 at 02:06 AM.
    Probe my IP

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •