On Wed, 2012-12-05 at 05:08 -0600, Fred Kilbourn wrote: > I am updating search indexes on all my mailboxes via a nightly cronjob that > runs: doveadm index -A '*' > > The problem we're running into is that random mailboxes will throw the > following error during the update (sanitized to conceal actual domain name): > > doveadm([email protected]): Error: > unlink_directory(/var/spool/mail/domain.com/user/sdbox/lucene-indexes) > failed: Permission denied > > We have around 250 domains on the server, with a handful of mailboxes on > average in each domain. We get this for a varying number of total mailboxes > (1 to 6 every night). It is common for the same mailbox to show up a few > days in a row and then stop throwing the error. The script is running as > root, so there shouldn't be any file level permissions.
Try if this works: doveadm index -A -q '*' This way the indexing is done by indexer processes with proper permissions. Although I wonder if it floods the indexer processes too quickly with the commands if there are a lot of users..
