Login doesn't work, page reloads

Hey guys,

After updating my nextcloud-setup, I’m unable to login to my instance. It might have been stupid me following docs that obviously aren’t meant to be used in conjunction with docker, nginx and php-fpm… So what I unfortunately did is chowning everything with the wrong permissions. I used the following commands:

find nextcloud/ -type d -exec chmod 750 {} \;
find nextcloud/ -type f -exec chmod 640 {} \;

When I realized what I did, I tried to unfdo the changes by using chmod to 755 and 644 respectively. I even created another nextcloud instance with the basically same config to find out the right perms to set. I did a diff and now they seem to be exactly the same (again).

The problem now is that when I login the page just reloads and asks me for the password again. Using the android APP works nevertheless.

I already tried a different browser/machine, ran occ maintenance:repair occ db:add-missing-colums, indices. No idea what to do next. My log is pretty uneventful as well.

docker-compose logs --tail=30

app_1 | 172.20.0.20 - 11/Aug/2020:16:58:09 +0000 “PROPFIND /remote.php” 401
app_1 | 172.20.0.20 - me 11/Aug/2020:16:58:08 +0000 “OPTIONS /remote.php” 200
app_1 | 172.20.0.20 - me 11/Aug/2020:16:58:09 +0000 “PROPFIND /remote.php” 207
app_1 | 172.20.0.20 - me 11/Aug/2020:16:58:10 +0000 “PROPFIND /remote.php” 207
app_1 | 172.20.0.20 - me 11/Aug/2020:16:58:09 +0000 “PROPFIND /remote.php” 207
app_1 | 172.20.0.20 - me 11/Aug/2020:16:58:11 +0000 “PROPFIND /remote.php” 207
app_1 | 172.20.0.20 - me 11/Aug/2020:16:58:12 +0000 “PROPFIND /remote.php” 207
app_1 | 172.20.0.20 - me 11/Aug/2020:16:58:12 +0000 “PROPFIND /remote.php” 207
app_1 | 172.20.0.20 - me 11/Aug/2020:16:58:12 +0000 “PROPFIND /remote.php” 207
app_1 | 172.20.0.20 - me 11/Aug/2020:16:58:12 +0000 “PROPFIND /remote.php” 207
app_1 | 172.20.0.20 - 11/Aug/2020:16:58:16 +0000 “GET /remote.php” 401
app_1 | 172.20.0.20 - me 11/Aug/2020:16:58:16 +0000 “GET /remote.php” 200
app_1 | 172.20.0.20 - me 11/Aug/2020:17:02:52 +0000 “PROPFIND /remote.php” 207
app_1 | 172.20.0.20 - user2 11/Aug/2020:17:11:39 +0000 “MKCOL /remote.php” 405
app_1 | 172.20.0.20 - user2 11/Aug/2020:17:11:40 +0000 “MKCOL /remote.php” 405
app_1 | 172.20.0.20 - user2 11/Aug/2020:17:11:40 +0000 “MKCOL /remote.php” 405
app_1 | 172.20.0.20 - 11/Aug/2020:17:25:32 +0000 “GET /index.php” 302
app_1 | 172.20.0.20 - 11/Aug/2020:17:25:32 +0000 “GET /index.php” 200
app_1 | 172.20.0.20 - 11/Aug/2020:17:25:36 +0000 “GET /index.php” 200
app_1 | 172.20.0.20 - 11/Aug/2020:17:25:36 +0000 “GET /index.php” 200
app_1 | 172.20.0.20 - 11/Aug/2020:17:25:36 +0000 “GET /index.php” 200
app_1 | 172.20.0.20 - 11/Aug/2020:17:25:36 +0000 “GET /index.php” 200
app_1 | 172.20.0.20 - 11/Aug/2020:17:25:36 +0000 “GET /index.php” 200
app_1 | 172.20.0.20 - 11/Aug/2020:17:25:42 +0000 “POST /index.php” 303
app_1 | 172.20.0.20 - 11/Aug/2020:17:25:42 +0000 “GET /index.php” 303
app_1 | 172.20.0.20 - 11/Aug/2020:17:25:42 +0000 “GET /index.php” 200
app_1 | 172.20.0.20 - 11/Aug/2020:17:27:59 +0000 “GET /index.php” 302
app_1 | 172.20.0.20 - 11/Aug/2020:17:28:01 +0000 “GET /index.php” 200
app_1 | 172.20.0.20 - me 11/Aug/2020:17:28:07 +0000 “PROPFIND /remote.php” 207
app_1 | 172.20.0.20 - 11/Aug/2020:17:37:43 +0000 “GET /index.php” 200
cron_1 | crond: wakeup dt=10
cron_1 | crond: wakeup dt=10
cron_1 | crond: wakeup dt=10
cron_1 | crond: wakeup dt=10
cron_1 | crond: wakeup dt=20
cron_1 | crond: file www-data:
cron_1 | crond: line php -f /var/www/html/cron.php
cron_1 | crond: job: 0 php -f /var/www/html/cron.php
cron_1 | crond: file www-data:
cron_1 | crond: child running /bin/ash
cron_1 | crond: USER www-data pid 855 cmd php -f /var/www/html/cron.php
cron_1 | crond: wakeup dt=10
cron_1 | crond: wakeup dt=10
cron_1 | crond: wakeup dt=10
cron_1 | crond: wakeup dt=10
cron_1 | crond: wakeup dt=10
cron_1 | crond: wakeup dt=10
cron_1 | crond: file www-data:
cron_1 | crond: line php -f /var/www/html/cron.php
cron_1 | crond: file www-data:
cron_1 | crond: wakeup dt=10
cron_1 | crond: user:www-data entry:*/5 * * * * php -f /var/www/html/cron.php
cron_1 | 100001000010000100001000010000100001000010000100001000010000
cron_1 | 111111111111111111111111
cron_1 | 11111111111111111111111111111111
cron_1 | 111111111111
cron_1 | 1111111
cron_1 | crond: wakeup dt=10
cron_1 | crond: wakeup dt=10
cron_1 | crond: wakeup dt=10
db_1 | 2020-08-08 15:44:23+00:00 [Note] [Entrypoint]: Switching to dedicated user ‘mysql’
db_1 | 2020-08-08 15:44:23+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.4+maria~focal started.
db_1 | 2020-08-08 15:44:26 0 [Note] mysqld (mysqld 10.5.4-MariaDB-1:10.5.4+maria~focal) starting as process 1 …
db_1 | 2020-08-08 15:44:26 0 [Warning] You need to use --log-bin to make --binlog-format work.
db_1 | 2020-08-08 15:44:26 0 [Note] InnoDB: Using Linux native AIO
db_1 | 2020-08-08 15:44:26 0 [Note] InnoDB: Uses event mutexes
db_1 | 2020-08-08 15:44:26 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
db_1 | 2020-08-08 15:44:26 0 [Note] InnoDB: Number of pools: 1
db_1 | 2020-08-08 15:44:26 0 [Note] InnoDB: Using SSE4.2 crc32 instructions
db_1 | 2020-08-08 15:44:26 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
db_1 | 2020-08-08 15:44:26 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
db_1 | 2020-08-08 15:44:26 0 [Note] InnoDB: Completed initialization of buffer pool
db_1 | 2020-08-08 15:44:26 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
db_1 | 2020-08-08 15:44:26 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=4454768574
db_1 | 2020-08-08 15:44:29 0 [Note] InnoDB: Starting final batch to recover 21 pages from redo log.
db_1 | 2020-08-08 15:44:30 0 [Note] InnoDB: 128 rollback segments are active.
db_1 | 2020-08-08 15:44:31 0 [Note] InnoDB: Removed temporary tablespace data file: “ibtmp1”
db_1 | 2020-08-08 15:44:31 0 [Note] InnoDB: Creating shared tablespace for temporary tables
db_1 | 2020-08-08 15:44:31 0 [Note] InnoDB: Setting file ‘./ibtmp1’ size to 12 MB. Physically writing the file full; Please wait …
db_1 | 2020-08-08 15:44:31 0 [Note] InnoDB: File ‘./ibtmp1’ size is now 12 MB.
db_1 | 2020-08-08 15:44:31 0 [Note] InnoDB: 10.5.4 started; log sequence number 4454773030; transaction id 18229759
db_1 | 2020-08-08 15:44:31 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
db_1 | 2020-08-08 15:44:31 0 [Note] Plugin ‘FEEDBACK’ is disabled.
db_1 | 2020-08-08 15:44:31 0 [Note] Server socket created on IP: ‘::’.
db_1 | 2020-08-08 15:44:32 0 [Warning] ‘proxies_priv’ entry ‘@% root@762e5be08ea3’ ignored in --skip-name-resolve mode.
db_1 | 2020-08-08 15:44:34 0 [Note] Reading of all Master_info entries succeeded
db_1 | 2020-08-08 15:44:34 0 [Note] Added new Master_info ‘’ to hash table
db_1 | 2020-08-08 15:44:34 0 [Note] mysqld: ready for connections.
db_1 | Version: ‘10.5.4-MariaDB-1:10.5.4+maria~focal’ socket: ‘/run/mysqld/mysqld.sock’ port: 3306 mariadb.org binary distribution
db_1 | 2020-08-08 15:44:59 0 [Note] InnoDB: Buffer pool(s) load completed at 200808 15:44:59
web_1 | 10.0.0.13 - - [11/Aug/2020:16:58:09 +0000] “PROPFIND /remote.php/carddav/ HTTP/1.1” 401 317 “-” “Evolution/3.36.4” “10.0.0.13”
web_1 | 10.0.0.13 - me [11/Aug/2020:16:58:10 +0000] “OPTIONS /remote.php/carddav/addressbooks/me/z-app-generated–contactsinteraction–recent/ HTTP/1.1” 200 0 “-” “Evolution/3.36.4” “10.0.0.13”
web_1 | 10.0.0.13 - me [11/Aug/2020:16:58:11 +0000] “PROPFIND /remote.php/carddav/ HTTP/1.1” 207 584 “-” “Evolution/3.36.4” “10.0.0.13”
web_1 | 10.0.0.13 - me [11/Aug/2020:16:58:12 +0000] “PROPFIND /remote.php/carddav/addressbooks/me/z-app-generated–contactsinteraction–recent/ HTTP/1.1” 207 562 “-” “Evolution/3.36.4” “10.0.0.13”
web_1 | 10.0.0.13 - me [11/Aug/2020:16:58:12 +0000] “PROPFIND /remote.php/caldav/calendars/me/contact_birthdays/ HTTP/1.1” 207 420 “-” “Evolution/3.36.4” “10.0.0.13”
web_1 | 10.0.0.13 - me [11/Aug/2020:16:58:12 +0000] “PROPFIND /remote.php/carddav/principals/me/ HTTP/1.1” 207 426 “-” “Evolution/3.36.4” “10.0.0.13”
web_1 | 10.0.0.13 - me [11/Aug/2020:16:58:12 +0000] “PROPFIND /remote.php/carddav/addressbooks/me/z-app-generated–contactsinteraction–recent/ HTTP/1.1” 207 453 “-” “Evolution/3.36.4” “10.0.0.13”
web_1 | 10.0.0.13 - me [11/Aug/2020:16:58:12 +0000] “PROPFIND /remote.php/carddav/addressbooks/me/ HTTP/1.1” 207 1768 “-” “Evolution/3.36.4” “10.0.0.13”
web_1 | 10.0.0.13 - me [11/Aug/2020:16:58:13 +0000] “PROPFIND /remote.php/caldav/calendars/me/contact_birthdays/ HTTP/1.1” 207 420 “-” “Evolution/3.36.4” “10.0.0.13”
web_1 | 10.0.0.13 - me [11/Aug/2020:16:58:13 +0000] “PROPFIND /remote.php/carddav/addressbooks/me/z-app-generated–contactsinteraction–recent/ HTTP/1.1” 207 453 “-” “Evolution/3.36.4” “10.0.0.13”
web_1 | 10.0.0.13 - - [11/Aug/2020:16:58:16 +0000] “GET /remote.php/webdav/ HTTP/1.1” 401 426 “-” “-” “10.0.0.13”
web_1 | 10.0.0.13 - me [11/Aug/2020:16:58:19 +0000] “GET /remote.php/webdav/ HTTP/1.1” 200 122 “-” “-” “10.0.0.13”
web_1 | 10.0.0.13 - me [11/Aug/2020:17:02:53 +0000] “PROPFIND /remote.php/caldav/calendars/me/contact_birthdays/ HTTP/1.1” 207 420 “-” “Evolution/3.36.4” “10.0.0.13”
web_1 | 109.41.64.154 - user2 [11/Aug/2020:17:11:40 +0000] “MKCOL /remote.php/webdav/Photos HTTP/1.1” 405 258 “-” “Mozilla/5.0 (iOS) Nextcloud-iOS/3.0.0” “109.41.64.154”
web_1 | 109.41.64.154 - user2 [11/Aug/2020:17:11:40 +0000] “MKCOL /remote.php/webdav/Photos/2020 HTTP/1.1” 405 258 “-” “Mozilla/5.0 (iOS) Nextcloud-iOS/3.0.0” “109.41.64.154”
web_1 | 109.41.64.154 - user2 [11/Aug/2020:17:11:40 +0000] “MKCOL /remote.php/webdav/Photos/2020/08 HTTP/1.1” 405 258 “-” “Mozilla/5.0 (iOS) Nextcloud-iOS/3.0.0” “109.41.64.154”
web_1 | 10.0.0.13 - - [11/Aug/2020:17:25:32 +0000] “GET / HTTP/1.1” 302 5 “-” “Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0” “10.0.0.13”
web_1 | 10.0.0.13 - - [11/Aug/2020:17:25:36 +0000] “GET /login HTTP/1.1” 200 4332 “-” “Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0” “10.0.0.13”
web_1 | 10.0.0.13 - - [11/Aug/2020:17:25:36 +0000] “GET /apps/theming/js/theming?v=0 HTTP/1.1” 200 243 “-” “Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0” “10.0.0.13”
web_1 | 10.0.0.13 - - [11/Aug/2020:17:25:36 +0000] “GET /apps/accessibility/js/accessibility?v=0 HTTP/1.1” 200 85 “-” “Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0” “10.0.0.13”
web_1 | 10.0.0.13 - - [11/Aug/2020:17:25:36 +0000] “GET /apps/theming/styles?v=0 HTTP/1.1” 200 473 “-” “Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0” “10.0.0.13”
web_1 | 10.0.0.13 - - [11/Aug/2020:17:25:36 +0000] “GET /svg/core/logo/logo?color=fff&v=1 HTTP/1.1” 499 0 “-” “Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0” “10.0.0.13”
web_1 | 10.0.0.13 - - [11/Aug/2020:17:25:36 +0000] “GET /js/core/merged-template-prepend.js?v=41edba76-0 HTTP/1.1” 200 2982 “-” “Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0” “10.0.0.13”
web_1 | 10.0.0.13 - - [11/Aug/2020:17:25:42 +0000] “POST /login HTTP/1.1” 303 0 “-” “Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0” “10.0.0.13”
web_1 | 10.0.0.13 - - [11/Aug/2020:17:25:42 +0000] “GET /apps/files/ HTTP/1.1” 303 0 “-” “Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0” “10.0.0.13”
web_1 | 10.0.0.13 - - [11/Aug/2020:17:25:42 +0000] “GET /login?redirect_url=/apps/files/ HTTP/1.1” 200 4354 “-” “Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0” “10.0.0.13”
web_1 | 10.0.0.13 - - [11/Aug/2020:17:28:01 +0000] “GET /favicon.ico HTTP/1.1” 302 5 “-” “Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0” “10.0.0.13”
web_1 | 10.0.0.13 - - [11/Aug/2020:17:28:01 +0000] “GET /login HTTP/1.1” 200 4334 “-” “Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0” “10.0.0.13”
web_1 | 10.0.0.13 - me [11/Aug/2020:17:28:08 +0000] “PROPFIND /remote.php/caldav/calendars/me/contact_birthdays/ HTTP/1.1” 207 420 “-” “Evolution/3.36.4” “10.0.0.13”
web_1 | 10.0.0.13 - - [11/Aug/2020:17:37:43 +0000] “GET /csrftoken HTTP/1.1” 200 103 “-” “Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0” “10.0.0.13”
redis_1 | 1:C 08 Aug 2020 15:44:22.703 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1 | 1:C 08 Aug 2020 15:44:22.703 # Redis version=6.0.6, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1 | 1:C 08 Aug 2020 15:44:22.703 # Configuration loaded
redis_1 | 1:M 08 Aug 2020 15:44:22.704 * Running mode=standalone, port=6379.
redis_1 | 1:M 08 Aug 2020 15:44:22.705 # Server initialized
redis_1 | 1:M 08 Aug 2020 15:44:22.705 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add ‘vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect.
redis_1 | 1:M 08 Aug 2020 15:44:22.705 * Ready to accept connections

Thank you!

My advice is restore from backup or migrate to a new instance. I can’t tell based on the above what was changed or may still need corrections.

It seems to be a problem with a nextcloud update, because I tried restoring 3 different backups points and none of them gave me different end-result. Could it be a problem with traefik?

        - "traefik.enable=true"
        - "traefik.http.routers.nextcloud.rule=Host(`nextcloud.mydomain.com`)"
        - "traefik.http.routers.nextcloud.entrypoints=web"
        - "traefik.http.routers.nextcloud.middlewares=redirect-to-https@docker"
        - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
        - "traefik.http.routers.nextcloud-secure.rule=Host(`nextcloud.mydomain.com`)"
        - "traefik.http.routers.nextcloud-secure.entrypoints=websecure"
        - "traefik.http.routers.nextcloud-secure.tls=true"
        - "traefik.http.routers.nextcloud-secure.middlewares=nextcloudheaders@docker,nextcloud-dav@docker"
        - "traefik.http.middlewares.nextcloudheaders.headers.customRequestHeaders.X-Forwarded-Proto=https"
        - "traefik.http.middlewares.nextcloudheaders.headers.accessControlAllowOrigin=*"
        - "traefik.http.middlewares.nextcloud-dav.replacepathregex.regex=^/.well-known/ca(l|rd)dav"
        - "traefik.http.middlewares.nextcloud-dav.replacepathregex.replacement=/remote.php/dav/

I figuered it out, redis was behaving weird. After disabling the password protection it started to work.

For anyone who’s trying to debug, please do yourself a favior and enable loglevel 0 and logfile /var/log/nextcloud.log in your config.php. Otherwise you won’t get any log that comes from nextcloud directly.