Upgrade 3.5 to 3.6 : zammad.postinst : freezed on chown -R zammad.zammad /opt/zammad?


I upgraded from 3.5 to 3.6 on Ubnutu with a sudo apt upgrade and the bash console is still on “Setting up zammad (3.6.0-1607430494.246be029e.bionic)” for more than 3 hours now.

htop contains this since mors than 2 hours : chown -R zammad.zammad /opt/zammad with an activity under 1% of CPU !! :face_with_raised_eyebrow:

The D flag, I don’t like it ! :thinking:

Can you help me?

I decided to stop postinst script and commented the line #54 in zammad.postinst :


I run sudo dpkg --configure -a to restart post install script…

So script seems to work…

But myabe I will have bad surprise ??

chown’s on directories with many files can take a long time. The D flags indicates it’s waiting for IO/DiskAccess.
I suppose you could try running the chown post upgrade. Maybe if you have many files in the /opt/zammad/tmp directory, it should be safe to clear them before running the chown, which might speed up the process

Ok and how to clear it safely ?
Is it ok with :

rails cache clear


i’m not a zammad expert, but if would clear it, it would stop all services, and execute; rm -rf /opt/zammad/tmp/*
But you could indeed also try with the rake commands

Running rails r "Cache.clear" is a totally safe operation.
Heads up on removing tmp/ directory as it can contain the following to folders:

  • unprocessible_mail
  • oversized_mail

If you have those directories and they’re not empty, you may loose data which you might want to prevent. If not, removing shouldn’t be a too big deal.

On big installations the cown command usually takes long because administrators chose to store attachments within the filesystem and not database. While this makes absolutely sense, this slows down the update process with fairly many files.

The chown command is enforced by our packager and can’t be adjusted. Otherwise one could find a much less I/O requiring method to only touch affected files.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.