Nextcloud version: 24.0.1
Docker Container base Image: nextcloud:24.0.1-apache
Docker Container in use: icebrian/nextcloud-docker-smb:24.0.1-v1-apache
(this is my own docker image that simply adds SMB support to it)
Can’t open any of my public shares. With or without password. When I open created link, nextcloud page opens but then seems to be stuck at loading, displaying two animated brackets, and never gets past that meaning I never get to actually see the contents of the folder. This is what I see Imgur: The magic of the Internet (had to put image in imgur as it seems I can’t upload here).
All my files are on an external storage device, made available to Nextcloud via external storage SMB meaning I don’t have any local files.
This is also a new installation on Kubernetes using Nextcloud helm charts and nextcloud base image with tag 24.0.1-apache on which I then add SMB support to it via the following Dockerfile:
FROM nextcloud:24.0.1-apache
RUN apt-get update && apt-get install -y sudo procps smbclient libsmbclient-dev && pecl install smbclient && docker-php-ext-enable smbclient && rm -rf /var/lib/apt/lists/*
RUN sed -i 's/opcache.interned_strings_buffer=16/opcache.interned_strings_buffer=32/g' /usr/local/etc/php/conf.d/opcache-recommended.ini
RUN mkdir /var/www/.cache && mkdir /var/www/.cache/samba
Since this is a container all logs are show in same output, and when I try to access a public share I get the following PROPFIND 404:
10.42.0.38 - - [06/Jun/2022:21:24:12 +0000] "GET /s/6bMFYok9pixWZex HTTP/1.1" 200 8320 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36"
10.42.0.38 - 6bMFYok9pixWZex [06/Jun/2022:21:24:13 +0000] "PROPFIND /public.php/webdav/ HTTP/1.1" 404 1016 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36"
6bMFYok9pixWZex is the public share that was generated, as we can see above, first we get a 200 on the GET, then a 404 on the PROPFIND method.
I suspect this is a possible nginx ingress configuration (provided via the helm chart) issue so here is the config I think is most relevant (if not please let me know as I will supply whatever might be needed):
server_tokens off;
proxy_hide_header X-Powered-By;
client_max_body_size 16G;
fastcgi_read_timeout 3600s;
proxy_buffering off;
gzip off;
rewrite ^/.well-known/webfinger /index.php/.well-known/webfinger last;
rewrite ^/.well-known/nodeinfo /index.php/.well-known/nodeinfo last;
rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json;
location = /.well-known/carddav {
return 301 $scheme://$host/remote.php/dav;
}
location = /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
deny all;
}
location ~ ^/(?:autotest|occ|issue|indie|db_|console) {
deny all;
}
And finally, if anyone is interested here is .htaccess file contents https://pastebin.com/U6X5X2s6, however, please note that this file is the default file provided by the oficial nextcloud container image and not mine. Altering it will require me to build my own container image.
Any and all help will be very much appreciated!
EDIT0: various corrections in original text
EDIT1: I created a github issue in nextcloud helm project at: https://github.com/nextcloud/helm/issues/239 (not sure if it should or not be in the docker repo issues)
EDIT2: Just noticed that the “Download all files” works just fine. It sends me a ZIP with the directory contents. So it seems the issue is really only with the listing. I am loosing my mind, I have tried everything!
EDIT3: So I just did a brand new install, using helm to deploy on kubernetes and tested imediately a public share on local storage and everything worked. I then installed the External storage app and added my SMB storage then did the same, created a public share and tested, and problem once again is happening. Share contents are not shown.
So it seems that the issue is specifically when doing a public share on an external drive. Now I don’t know if this is specific to nextcloud on containers or may-be general to nextcloud itself. Can anyone test and confirm?