Renaming not supported across conflicting directory - why?

Arkadiusz Miśkiewicz arekm at
Thu Oct 30 08:34:36 UTC 2014

I wonder what is point of checkign file/dir create mode like this?

Here it makes problems since some folders have different permissions than 
others but both are accessible/writable by user. So renaming is possible (as 
renaming according to unix permissions). Yet dovecot artificially prevents 

        /* if we're renaming under another mailbox, require its permissions
           to be same as ours. */
        if (strchr(newname, mailbox_list_get_hierarchy_sep(newlist)) != NULL) 
                struct mailbox_permissions old_perm, new_perm;

                mailbox_list_get_permissions(oldlist, oldname, &old_perm);
                mailbox_list_get_permissions(newlist, newname, &new_perm);

                if ((new_perm.file_create_mode != old_perm.file_create_mode ||
                     new_perm.dir_create_mode != old_perm.dir_create_mode ||
                     new_perm.file_create_gid != old_perm.file_create_gid)) {
                                "Renaming not supported across conflicting "
                                "directory permissions");
                        return -1;

Arkadiusz Miśkiewicz, arekm / ( | )

More information about the dovecot mailing list