[pkg-kolab] Bug#411529: /usr/sbin/cyrus-makedirs: chown -R cyrus:mail "$confdir" is slow

Holger Burbach holger.burbach at gonicus.de
Mon Feb 19 17:42:45 CET 2007

Package: kolab-cyrus-common
Version: 2.2.13-2
Severity: wishlist

Updating the package kolab-cyrus-common on our mail server took > 30
minutes. kolab-cyrus-common.postinst calls 

	/usr/sbin/cyrus-makedirs --cleansquat

which executes an

	chown -R cyrus:mail "$confdir" (line 92)


	chown -R cyrus:mail "$i" (line 105)
	chown -R cyrus:mail "$sievedir" (line 131).

Our mail server stores ~150GB and hundred-thousands of mails. Therefore
the "chown -R cyrus:mail" is executed for every file and the changement
of ownership must be written to disk for every single mail.

IMHO a much faster way is:

	find "$confdir" -not -user cyrus -or -not -group mail -exec chown cyrus:mail {} \;

Best regards,

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-686
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)

Versions of packages kolab-cyrus-common depends on:
ii  adduser       3.102                      Add and remove users and groups
ii  debconf [debc 1.5.11                     Debian configuration management sy
ii  dpkg          1.13.25                    package maintenance system for Deb
ii  gawk          1:3.1.5.dfsg-4             GNU awk, a pattern scanning and pr
ii  libc6         2.3.6.ds1-11               GNU C Library: Shared libraries
ii  libdb4.2      4.2.52+dfsg-1              Berkeley v4.2 Database Libraries [
ii  libldap2      2.1.30-13.2                OpenLDAP libraries
ii  libsasl2-2    2.1.22.dfsg1-8             Authentication abstraction library
ii  libsnmp9      5.2.3-7                    NET SNMP (Simple Network Managemen
ii  libssl0.9.8   0.9.8c-4                   SSL shared libraries
ii  libwrap0      7.6.dbs-12                 Wietse Venema's TCP wrappers libra
ii  libzephyr3    2.1.20010518.SNAPSHOT-17.1 The original "Instant Message" sys
ii  netbase       4.29                       Basic TCP/IP networking system
ii  perl          5.8.8-7                    Larry Wall's Practical Extraction 
ii  postfix [mail 2.3.6-1                    A high-performance mail transport 

kolab-cyrus-common recommends no packages.

-- debconf information:
  kolab-cyrus-common/removespools: false

More information about the pkg-kolab-devel mailing list