# 403 forbidden from nginx but only for some apps after migration

**URL:** https://forum.yunohost.org/t/403-forbidden-from-nginx-but-only-for-some-apps-after-migration/37794
**Category:** Support
**Tags:** migration, nginx, english
**Created:** [July 20, 2025, 3:54pm UTC](https://forum.yunohost.org/t/403-forbidden-from-nginx-but-only-for-some-apps-after-migration/37794 "2025-07-20T15:54:11Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![hans](https://forum.yunohost.org/user_avatar/forum.yunohost.org/hans/32/12411_2.png) [@hans](https://forum.yunohost.org/u/hans)
#### Post date: [July 20, 2025, 3:54pm UTC](https://forum.yunohost.org/t/403-forbidden-from-nginx-but-only-for-some-apps-after-migration/37794/1 "2025-07-20T15:54:11Z")

</div>

**What type of hardware are you using** : VPS bought online  
**What YunoHost version are you running** : 12.0.17  
**How are you able to access your server** : The webadmin  
SSH  
**Are you in a special context or did you perform specific tweaking on your YunoHost instance ?** : I used an automatic migration tool from my hoster to move my VPS from Virtuozzo to KVM

### Describe your issue

Forum newbie here but have been using Yunohost for a while. Know basic command line and Linux stuff. I’m posting with a somewhat unusual “nginx 403 forbidden” problem:

My hosting provider Strato has pushed me to migrate my VPS from an old Virtuozzo-based machine to a newer KVM-based one. Their web-based migration process promised that “everything will be as before” after migration, all files will be copied over. The migration threw no error.

There were couple smaller issues I was able to fix myself (like my Yunohost admin user was gone on the new machine), but I struggle with one last weird thing:

Half my apps stopped working, throwing me a 403 permissions error:

**Works:** Yunohost admin interface, Synapse, Vaultwarden, LSTU link shortener, Wikijs, Readeck

**Does not work:**

- Pixelfed just loads an empty page in the browser
- 2x Wordpress throw an nginx 403
- Automad throws an nginx 403
- Nextcloud throws an nginx 403
- Dovecot fails to load with a TLS handshaking: SSL\_accept() failed: error:0A00006C:SSL routines::bad key share in the logs [Dovecot logs](https://paste.yunohost.org/onolemunux)

With regard to 403 I checked the folder permissions and ownership in `/var/www` which I assume each should have their own name as user and group. Except Synapse, all those that did not work had a group ownership called `tape`. I changed it back to their respective name, with e.g. `chown -R nextcloud:nextcloud /var/www/nextcloud` and reloaded nginx but the permissions error persists.

With regard to Dovecot I noticed Yunohost diagnosis says port 993 was closed but when I do:

`$ sudo nmap -sU -p 993 xx.xx.xx.xx`  
`Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-07-20 17:48 CEST`  
`Nmap scan report for my.domain.net (xx.xx.xx.xx)`  
`Host is up (0.15s latency).`

`PORT STATE SERVICE`  
`993/udp open|filtered imaps`

If anyone has an idea what else I could try to understand what’s wrong with those apps, I’d be incredibly grateful! Please let me know if you need any more data or logs and a big thank you already or reading this!

### Share relevant logs or error messages

> **[hastebin](https://paste.yunohost.org/onolemunux)**

---

<div class="post-metadata">

### Author: ![otm33](https://forum.yunohost.org/user_avatar/forum.yunohost.org/otm33/32/11941_2.png) [@otm33](https://forum.yunohost.org/u/otm33)
#### Post date: [July 20, 2025, 7:28pm UTC](https://forum.yunohost.org/t/403-forbidden-from-nginx-but-only-for-some-apps-after-migration/37794/2 "2025-07-20T19:28:53Z")

</div>

> [@hans](#):
>
> `chown -R nextcloud:nextcloud /var/www/nextcloud` and reloaded nginx but the permissions error persists.

Nginx needs access to the apps files so you have to change ownership (and maybe permissions). For example, for Nextcloud :

```auto
chown -R nextcloud:www-data /var/www/nextcloud

```

And did you try

```auto
yunohost tools regen-conf dovecot

```

---

<div class="post-metadata">

### Author: ![tituspijean](https://forum.yunohost.org/user_avatar/forum.yunohost.org/tituspijean/32/3584_2.png) [@tituspijean](https://forum.yunohost.org/u/tituspijean)
#### Post date: [July 20, 2025, 8:43pm UTC](https://forum.yunohost.org/t/403-forbidden-from-nginx-but-only-for-some-apps-after-migration/37794/3 "2025-07-20T20:43:04Z")

</div>

Try force-upgrading the apps with `sudo yunohost app upgrade <theapp> -F`  
This will make sure all the permissions are set correctly.

In YunoHost 12.1 (still in testing), there will be a button for that in each app page in the webadmin.

If the issue remains, please share the NGINX `<domain>-error` logs.

---

<div class="post-metadata">

### Author: ![hans](https://forum.yunohost.org/user_avatar/forum.yunohost.org/hans/32/12411_2.png) [@hans](https://forum.yunohost.org/u/hans)
#### Post date: [July 21, 2025, 10:36am UTC](https://forum.yunohost.org/t/403-forbidden-from-nginx-but-only-for-some-apps-after-migration/37794/4 "2025-07-21T10:36:28Z")

</div>

Oh thanks a million @tituspijean for this super straight forward solution. Force-updating those apps did indeed fix the permissions problem!

The only open problem that remains is dovecot which refuses to start. I first thought it might be a port 993 problem (maybe my VPS hoster blocking it but they confirmed to me today they do not), but now I think there must be another reasons. [The logs](https://paste.yunohost.org/onolemunux) throw all those TLS/SSL handshake errors wrong version numbers but I cannot quite make sense of it. 😬

**Edit:** Adding this oddity from the admin panel which argues my Dovecot has been “inactive since over 55 years” 🤔

 ![grafik](https://forum.yunohost.org/uploads/default/original/2X/2/2a442f3da29e58f2dcd8daec3ee7b4f75aa211b3.png)

**Edit** for @otm33: Unfortunately `yunohost tools regen-conf dovecot` did not solve it. Dovecot still refuses to start. ☹

---

<div class="post-metadata">

### Author: ![system](https://forum.yunohost.org/uploads/default/original/2X/f/f59fe8e3ee6b100b4f574d30d6e30479c68b89f0.png) [@system](https://forum.yunohost.org/u/system)
#### Post date: [August 20, 2025, 10:36am UTC](https://forum.yunohost.org/t/403-forbidden-from-nginx-but-only-for-some-apps-after-migration/37794/5 "2025-08-20T10:36:58Z")

</div>

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