After accidentally changing the whole directory permission of nextcloud, I cannot access it anymore it the WebBrowser

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (20.0.0.3):
Operating system and version (Debian 10):
Apache or nginx version (Nginx 1.14.2:
PHP version (7.3):

The issue you are facing:

When I access nextcloud in the WebUI: 504 Gateway Time-out - nginx

Is this the first time you’ve seen this error? (Y)

Steps to replicate it:

  1. After accidentaly running a chown/chgrp command for the whole nextcloud folder, I cannot access Nextclud in the browser anymore

2.image

My directory looks like this now, everything is owned by www-data

504 Gateway Time-out

nginx

The output of your Nextcloud log in Admin > Logging:

{"reqId":"PlXZvbHL2u8JIEgSU4f6","level":2,"time":"2020-12-05T00:13:32+00:00","remoteAddr":"154.13.1.27","user":"--","app":"core","method":"GET","url":"/nextcloud/","message":"Login failed: 'lynxtitan' (Remote IP: '154.13.1.27')","userAg$
{"reqId":"FRbf3FIiunPNkKLZ8tzp","level":2,"time":"2020-12-05T00:14:17+00:00","remoteAddr":"154.13.1.27","user":"--","app":"core","method":"GET","url":"/nextcloud/login","message":"Login failed: 'lynxtitan' (Remote IP: '154.13.1.27')","u$
{"reqId":"kFEw2i9WKOt5Sadg5vzY","level":2,"time":"2020-12-05T00:18:49+00:00","remoteAddr":"154.13.1.27","user":"--","app":"core","method":"POST","url":"/nextcloud/login","message":"Login failed: 'lynxtitan' (Remote IP: '154.13.1.27')","$
{"reqId":"zIwjInJUUmc0kzq5ICMy","level":2,"time":"2020-12-05T00:20:21+00:00","remoteAddr":"154.13.1.27","user":"--","app":"core","method":"GET","url":"/nextcloud/apps/files/?dir=/Haubaum&fileid=568050","message":"Login failed: 'lynxtita$
{"reqId":"hZ4CmuDz6cKLja2z3SOk","level":2,"time":"2020-12-05T00:20:25+00:00","remoteAddr":"154.13.1.27","user":"--","app":"core","method":"GET","url":"/nextcloud/login?redirect_url=/nextcloud/apps/files/?dir%3D/Haubaum%26fileid%3D568050$
{"reqId":"g42yT28xJ8DB7FUBBHo8","level":2,"time":"2020-12-05T00:21:10+00:00","remoteAddr":"154.13.1.27","user":"--","app":"core","method":"GET","url":"/nextcloud/csrftoken","message":"Login failed: 'lynxtitan' (Remote IP: '154.13.1.27')$
{"reqId":"BTgb5LBXlof76uzYHFMt","level":2,"time":"2020-12-05T00:23:06+00:00","remoteAddr":"154.13.1.27","user":"--","app":"core","method":"GET","url":"/nextcloud/","message":"Login failed: 'lynxtitan' (Remote IP: '154.13.1.27')","userAg$
{"reqId":"y4SzIgyZkKczlctflOYa","level":2,"time":"2020-12-05T00:42:35+00:00","remoteAddr":"154.13.1.27","user":"--","app":"core","method":"GET","url":"/nextcloud/","message":"Login failed: 'lynxtitan' (Remote IP: '154.13.1.27')","userAg$
{"reqId":"XhrsxiZwp1K6uUUMSWZw","level":2,"time":"2020-12-05T00:47:03+00:00","remoteAddr":"154.13.1.27","user":"--","app":"core","method":"GET","url":"/nextcloud/","message":"Login failed: 'lynxtitan' (Remote IP: '154.13.1.27')","userAg$
{"reqId":"FNIRakPcX43mP0NmbvI7","level":2,"time":"2020-12-05T00:47:48+00:00","remoteAddr":"154.13.1.27","user":"--","app":"core","method":"GET","url":"/nextcloud/login","message":"Login failed: 'lynxtitan' (Remote IP: '154.13.1.27')","u$
{"reqId":"105smDdoLRmaRnVG7Y2u","level":4,"time":"2020-12-05T00:59:03+00:00","remoteAddr":"212.17.88.59","user":"avgeist","app":"webdav","method":"PROPFIND","url":"/nextcloud/remote.php/webdav/Haubaum/","message":{"Exception":"Sabre\\DA$


The output of your Apache/nginx/system log in /var/log/____:


2020/12/05 11:35:51 [error] 357152#357152: *12206 upstream timed out (110: Connection timed out) while reading response header from upstream, client: , server: hcoe.club, request: "PROPFIND /nextcloud/remote.php/webdav/Docum$
2020/12/05 11:43:50 [error] 357152#357152: send() failed (111: Connection refused) while resolving, resolver: 127.0.0.1:53
2020/12/05 11:49:36 [error] 357152#357152: send() failed (111: Connection refused) while resolving, resolver: 127.0.0.1:53
2020/12/05 11:50:56 [error] 357152#357152: *12544 upstream timed out (110: Connection timed out) while reading response header from upstream, client: , server: hcoe.club, request: "GET /nextcloud/login?redirect_url=/nextcloud$
2020/12/05 11:56:02 [error] 357152#357152: send() failed (111: Connection refused) while resolving, resolver: 127.0.0.1:53
2020/12/05 12:03:38 [error] 357152#357152: send() failed (111: Connection refused) while resolving, resolver: 127.0.0.1:53
2020/12/05 12:04:38 [error] 357152#357152: *12795 upstream timed out (110: Connection timed out) while reading response header from upstream, client:, server: hcoe.club, request: "GET /nextcloud/login?redirect_url=/nextcloud$
2020/12/05 12:19:30 [error] 357152#357152: send() failed (111: Connection refused) while resolving, resolver: 127.0.0.1:53
2020/12/05 12:35:02 [error] 357152#357152: send() failed (111: Connection refused) while resolving, resolver: 127.0.0.1:53



Hi Jan,

welcome to the forums :slight_smile:

Under which user is your web server running?

Hi,

If you mean this?

/srv/nextcloud$ ps aux|grep nginx|grep -v grep

    root         968  0.0  0.0  83600  9968 ?        Ss   01:40   0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
    nobody      2183  0.0  0.0  10904  5184 ?        Ss   01:41   0:00 nginx: master process nginx -g daemon off;
    nobody      2954  0.0  0.0  14368  4848 ?        S    01:41   0:00 nginx: worker process
    nobody      2955  0.0  0.0  14368  5604 ?        S    01:41   0:00 nginx: worker process
    nobody      2956  0.0  0.0  14368  4848 ?        S    01:41   0:00 nginx: worker process
    nobody      2957  0.0  0.0  14368  4848 ?        S    01:41   0:00 nginx: worker process
    nobody      2958  0.0  0.0  14368  4848 ?        S    01:41   0:00 nginx: worker process
    nobody      2959  0.0  0.0  14368  4848 ?        S    01:41   0:00 nginx: worker process
    nobody      2960  0.0  0.0  14368  4848 ?        S    01:41   0:00 nginx: worker process
    nobody      2961  0.0  0.0  14368  4852 ?        S    01:41   0:00 nginx: worker process
    www-data  357152  0.0  0.0  83600  8372 ?        S    06:14   0:21 nginx: worker process
    www-data  357153  0.0  0.0  83600  4976 ?        S    06:14   0:00 nginx: worker process
    www-data  357154  0.0  0.0  83600  7808 ?        S    06:14   0:00 nginx: worker process
    www-data  357155  0.0  0.0  83600  4976 ?        S    06:14   0:00 nginx: worker process
    www-data  357156  0.0  0.0  83600  4976 ?        S    06:14   0:00 nginx: worker process
    www-data  357157  0.0  0.0  83600  4976 ?        S    06:14   0:00 nginx: worker process
    www-data  357158  0.0  0.0  83600  4976 ?        S    06:14   0:00 nginx: worker process
    www-data  357159  0.0  0.0  83600  4976 ?        S    06:14   0:00 nginx: worker process

did you check the nginx.log and the fpm-php.log?

Thank you, found the Error in the fpm-php.log

[05-Dec-2020 18:07:49] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 14 total children
[05-Dec-2020 18:07:50] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 15 total children
[05-Dec-2020 18:07:51] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 16 total children
[05-Dec-2020 18:07:52] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 17 total children
[05-Dec-2020 18:07:53] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 18 total children
[05-Dec-2020 18:07:54] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 19 total children
[05-Dec-2020 18:07:55] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 20 total children
[05-Dec-2020 18:07:56] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 21 total children
[05-Dec-2020 18:07:57] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 22 total children
[05-Dec-2020 18:07:58] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 23 total children
[05-Dec-2020 18:07:59] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 24 total children

Raised

pm.max_children =
@ /etc/php5/fpm/pool.d/www.conf

Now it works again!