Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nextcloud: Weird smb behavior, potentially missing php module #2123

Open
BlauerHunger opened this issue Feb 1, 2024 · 3 comments
Open

Nextcloud: Weird smb behavior, potentially missing php module #2123

BlauerHunger opened this issue Feb 1, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@BlauerHunger
Copy link

BlauerHunger commented Feb 1, 2024

I'm running the nextcloud chart on TrueNAS SCALE Cobia and I have a smb share from the TrueNAS SCALE host mounted as external storage in the nextcloud app.

The "Install smbclient" option is ticked in the app configuration, but when syncing larger files (>1GiB) from the smb mounted external storage, sync fails and the postgres log shows entries like this one:

LOG:  could not receive data from client: Connection reset by peer

Nextcloud also creates huge amounts of log entries like this one:

fseek(): Stream does not support seeking at /var/www/html/apps/files_external/3rdparty/icewind/streams/src/...

A thorough search on the internet led me to this issue report on the nextcloud server github repo: nextcloud/server#41114. I don't know what exactly causes this problem, but I was able to get it working on my system running the following inside the nextcloud pod of the nextcloud app:

apt install libsmbclient-dev
pecl install smbclient
docker-php-ext-enable smbclient
apache2ctl restart

To me it looks like the app is missing the php smbclient module and utilizes some workaround that doesn't play well with the TrueNAS SCALE smb server. Is there any chance you could include the php smbclient module in the official nextcloud chart?

@BlauerHunger BlauerHunger changed the title Nextcloud: Weird smb behavior Nextcloud: Weird smb behavior, potentially missing php module Feb 1, 2024
@stavros-k stavros-k added the enhancement New feature or request label Feb 8, 2024
@BlauerHunger
Copy link
Author

BlauerHunger commented Feb 8, 2024

is this issue really an enhancement? I thought the "Install smbclient" checkbox is supposed to make external storages via smb work, but apparently it doesn't work except for small files and it doesn't fail gracefully and this behaviour isn't documented for this chart.

@stavros-k
Copy link
Contributor

Technically yes its an enhancement, because even the smb-client installation is more of "stop-gap" solution.
I think those kinds of dependencies should be included in the nextcloud container itself.

You could consider it a "bug" from nextcloud side, but I don't think this is correct either.
Its still an enhancement on their container.

Containers are not supposed to install packages on runtime.

Correct solution would be to have pre-build container will all the required packages. But then you also get to the other side, that you make everyone download an image that has packages that will never need (and potentially more "things" that might have vulns at some point).

I'm not opposed to making this work correctly, but we need to find a better solution.

@pabloeisenhut
Copy link

Technically yes its an enhancement, because even the smb-client installation is more of "stop-gap" solution. I think those kinds of dependencies should be included in the nextcloud container itself.

You could consider it a "bug" from nextcloud side, but I don't think this is correct either. Its still an enhancement on their container.

Containers are not supposed to install packages on runtime.

Correct solution would be to have pre-build container will all the required packages. But then you also get to the other side, that you make everyone download an image that has packages that will never need (and potentially more "things" that might have vulns at some point).

I'm not opposed to making this work correctly, but we need to find a better solution.

@stavros-k can you please have a look at nextcloud/docker#2186 (comment), maybe this is a solution for some existing problems described with #2123 (comment).
This is not (yet) a solution for the SMB behavior as far as I understand correctly, but for the problems referred to here. For example #2298.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants