[Nextcloud] Error 403 forbidden after failed update (to 27.0.2) due to missing free disk space

Hello friends of Yunohost and NC :slight_smile:

My YunoHost server

Hardware: - Home hosting - amd64 / 16 GB - bulleyes
YunoHost version: 11.2.3
I have access to my server : both Through SSH and through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

During the update of the Nextcloud app from 27.0.1~ynh1 to 27.0.2~ynh1, the process failed due to a full partition : https://paste.yunohost.org/raw/ihizelefuh
Strangely enough, when I look at the journal entries, there is one 20230812-165635-app_remove-nextcloud appearing right after the one above (I haven’t launch the app removal myselft) but the log seems empty : https://paste.yunohost.org/raw/eqebozodab

Since the problem occured due to missing disk space, I managed to free up some (mainly removing log files) and run the update again which seemed to have succeeded : https://paste.yunohost.org/raw/tufiquvude

After that, when I access the Nextcloud app, I only get a 403 forbidden access error.
The only log that I can get regarding the error is the one from nginx saying :

2023/08/13 15:24:57 [error] 1234#1234: *201 “/var/www/nextcloud/index.php” is forbidden (13: Permission denied), client: 37.167.51.160, server: [MyServerName], request: “GET / HTTP/2.0”, host: “[MyServerName]”
2023/08/13 15:24:57 [crit] 1234#1234: *201 stat() “/var/www/nextcloud/ynh_portal.js” failed (13: Permission denied), client: 37.167.51.160, server: [MyServerName], request: “GET /ynh_portal.js HTTP/2.0”, host: “[MyServerName]”
2023/08/13 15:24:57 [error] 1234#1234: *201 “/var/www/nextcloud/index.php” is forbidden (13: Permission denied), client: 37.167.51.160, server: [MyServerName], request: “GET /ynh_portal.js HTTP/2.0”, host: “[MyServerName]”
2023/08/13 15:24:57 [crit] 1234#1234: *201 stat() “/var/www/nextcloud/ynh_overlay.css” failed (13: Permission denied), client: 37.167.51.160, server: [MyServerName], request: “GET /ynh_overlay.css HTTP/2.0”, host: “[MyServerName]”
2023/08/13 15:24:57 [error] 1234#1234: *201 “/var/www/nextcloud/index.php” is forbidden (13: Permission denied), client: 37.167.51.160, server: [MyServerName], request: “GET /ynh_overlay.css HTTP/2.0”, host: “[MyServerName]”
2023/08/13 15:24:57 [crit] 1234#1234: *201 stat() “/var/www/nextcloud/ynhtheme/custom_portal.js” failed (13: Permission denied), client: 37.167.51.160, server: [MyServerName], request: “GET /ynhtheme/custom_portal.js HTTP/2.0”, host: “[MyServerName]”
2023/08/13 15:24:57 [error] 1234#1234: *201 “/var/www/nextcloud/index.php” is forbidden (13: Permission denied), client: 37.167.51.160, server: [MyServerName], request: “GET /ynhtheme/custom_portal.js HTTP/2.0”, host: “[MyServerName]”
2023/08/13 15:24:57 [crit] 1234#1234: *201 stat() “/var/www/nextcloud/ynhtheme/custom_overlay.css” failed (13: Permission denied), client: 37.167.51.160, server: [MyServerName], request: “GET /ynhtheme/custom_overlay.css HTTP/2.0”, host: “[MyServerName]”
2023/08/13 15:24:57 [error] 1234#1234: *201 “/var/www/nextcloud/index.php” is forbidden (13: Permission denied), client: 37.167.51.160, server: [MyServerName], request: “GET /ynhtheme/custom_overlay.css HTTP/2.0”, host: “[MyServerName]”
2023/08/13 15:24:57 [crit] 1234#1234: *201 stat() “/var/www/nextcloud/ynh_overlay.css” failed (13: Permission denied), client: 37.167.51.160, server: [MyServerName], request: “GET /ynh_overlay.css HTTP/2.0”, host: “[MyServerName]”
2023/08/13 15:24:57 [error] 1234#1234: *201 “/var/www/nextcloud/index.php” is forbidden (13: Permission denied), client: 37.167.51.160, server: [MyServerName], request: “GET /ynh_overlay.css HTTP/2.0”, host: “[MyServerName]”
2023/08/13 15:24:57 [crit] 1234#1234: *201 stat() “/var/www/nextcloud/ynhtheme/custom_overlay.css” failed (13: Permission denied), client: 37.167.51.160, server: [MyServerName], request: “GET /ynhtheme/custom_overlay.css HTTP/2.0”, host: “[MyServerName]”
2023/08/13 15:24:57 [error] 1234#1234: *201 “/var/www/nextcloud/index.php” is forbidden (13: Permission denied), client: 37.167.51.160, server: [MyServerName], request: “GET /ynhtheme/custom_overlay.css HTTP/2.0”, host: “[MyServerName]”
2023/08/13 15:24:58 [crit] 1234#1234: *201 stat() “/var/www/nextcloud/favicon.ico” failed (13: Permission denied), client: 37.167.51.160, server: [MyServerName], request: “GET /favicon.ico HTTP/2.0”, host: “[MyServerName]”
2023/08/13 15:24:58 [error] 1234#1234: *201 “/var/www/nextcloud/index.php” is forbidden (13: Permission denied), client: 37.167.51.160, server: [MyServerName], request: “GET /favicon.ico HTTP/2.0”, host: “[MyServerName]”

I am very afraid of restoring the backup yunohost did when I launch the first update because it would mean to remove the app first (fearing to lose all my data, contacts, calendar, password… - not the sync files). Besides, yunohost does not seem to put “timestamp” in their backup filenames hence the first backup has been overwritten by the second one which has been done after the first failed update :confused:

According to yunohost, the Nextcloud app is properly installed (with the latest update). Hence I suspect the problem could “only” come from an Nginx misconfiguration… but I don’t know really and I am stuck at the moment.

Thanks in advance for your help !

Guitch

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