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

**URL:** https://community.zammad.org/t/upgrade-3-5-to-3-6-zammad-postinst-freezed-on-chown-r-zammad-zammad-opt-zammad/5870
**Category:** Technical assistance
**Created:** [December 14, 2020, 1:58pm UTC](https://community.zammad.org/t/upgrade-3-5-to-3-6-zammad-postinst-freezed-on-chown-r-zammad-zammad-opt-zammad/5870 "2020-12-14T13:58:11Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Meloman-zz](https://community.zammad.org/user_avatar/community.zammad.org/meloman-zz/32/2132_2.png) [@Meloman-zz](https://community.zammad.org/u/Meloman-zz)
#### Post date: [December 14, 2020, 1:58pm UTC](https://community.zammad.org/t/upgrade-3-5-to-3-6-zammad-postinst-freezed-on-chown-r-zammad-zammad-opt-zammad/5870/1 "2020-12-14T13:58:11Z")

</div>

Hi,

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 !! 🤨

 ![image](https://community.zammad.org/uploads/default/original/2X/4/445bdd9672224efaa4daa831680047ed816a9e36.png)

The **D** flag, I don’t like it ! 🤔

Can you help me?

---

<div class="post-metadata">

### Author: ![Meloman-zz](https://community.zammad.org/user_avatar/community.zammad.org/meloman-zz/32/2132_2.png) [@Meloman-zz](https://community.zammad.org/u/Meloman-zz)
#### Post date: [December 14, 2020, 2:19pm UTC](https://community.zammad.org/t/upgrade-3-5-to-3-6-zammad-postinst-freezed-on-chown-r-zammad-zammad-opt-zammad/5870/2 "2020-12-14T14:19:38Z")

</div>

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

![image](https://community.zammad.org/uploads/default/original/2X/5/546649b4b6800612bc4b1679789b75809845ed81.png)

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

 ![image](https://community.zammad.org/uploads/default/original/2X/c/c899714b684ace2f7fcd971e1d0ad251e75ff055.png)

So script seems to work…

But myabe I will have bad surprise ??

---

<div class="post-metadata">

### Author: ![olafbuitelaar](https://community.zammad.org/user_avatar/community.zammad.org/olafbuitelaar/32/4769_2.png) [@olafbuitelaar](https://community.zammad.org/u/olafbuitelaar)
#### Post date: [December 14, 2020, 2:50pm UTC](https://community.zammad.org/t/upgrade-3-5-to-3-6-zammad-postinst-freezed-on-chown-r-zammad-zammad-opt-zammad/5870/3 "2020-12-14T14:50:04Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Meloman-zz](https://community.zammad.org/user_avatar/community.zammad.org/meloman-zz/32/2132_2.png) [@Meloman-zz](https://community.zammad.org/u/Meloman-zz)
#### Post date: [December 14, 2020, 3:18pm UTC](https://community.zammad.org/t/upgrade-3-5-to-3-6-zammad-postinst-freezed-on-chown-r-zammad-zammad-opt-zammad/5870/4 "2020-12-14T15:18:59Z")

</div>

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

`rails cache clear`

?

---

<div class="post-metadata">

### Author: ![olafbuitelaar](https://community.zammad.org/user_avatar/community.zammad.org/olafbuitelaar/32/4769_2.png) [@olafbuitelaar](https://community.zammad.org/u/olafbuitelaar)
#### Post date: [December 14, 2020, 3:21pm UTC](https://community.zammad.org/t/upgrade-3-5-to-3-6-zammad-postinst-freezed-on-chown-r-zammad-zammad-opt-zammad/5870/5 "2020-12-14T15:21:46Z")

</div>

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

---

<div class="post-metadata">

### Author: ![MrGeneration](https://community.zammad.org/user_avatar/community.zammad.org/mrgeneration/32/9260_2.png) [@MrGeneration](https://community.zammad.org/u/MrGeneration)
#### Post date: [December 30, 2020, 9:39am UTC](https://community.zammad.org/t/upgrade-3-5-to-3-6-zammad-postinst-freezed-on-chown-r-zammad-zammad-opt-zammad/5870/6 "2020-12-30T09:39:40Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://community.zammad.org/uploads/default/original/1X/5c5afaea2d23f811dbec33cd4edb02fa29d3262f.png) [@system](https://community.zammad.org/u/system)
#### Post date: [April 29, 2021, 9:39am UTC](https://community.zammad.org/t/upgrade-3-5-to-3-6-zammad-postinst-freezed-on-chown-r-zammad-zammad-opt-zammad/5870/7 "2021-04-29T09:39:44Z")

</div>

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