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

SMB #2145

Open
7 tasks
joshtrichards opened this issue Jan 12, 2024 · 6 comments
Open
7 tasks

SMB #2145

joshtrichards opened this issue Jan 12, 2024 · 6 comments
Labels

Comments

@joshtrichards
Copy link
Member

joshtrichards commented Jan 12, 2024

Documentation

There are inconsistencies between the SMB and FULL examples examples:

The former appears to be out-dated while the latter appears to better match the PHP image's recommended approach.

Some problems have been reported by others trying to use the SMB examples - e.g.

Tasks (preliminary):

  • Review PHP image's recommended approach for adding things
  • Assess whether our FULL example follows the PHP image model and otherwise seems reasonable
  • Confirm native rather than wrapped SMB mode is detected/used by External Storage
  • Test FULL example against a "typical" SMB server
  • Port tested FULL example to SMB only example

Out of scope but worth mentioning:

  • Upstream docs in this area could probably use some clarity (and I don't mean specific to Docker)

Image

Worth a revisit of whether to include/why we're not including smbclient in the image by default

Context:

Tasks

  • ... TBD
  • If not including, document why as a FAQ/Known Issue in the README
@joshtrichards joshtrichards changed the title SMB examples SMB Jan 16, 2024
@joshtrichards
Copy link
Member Author

We also might want to explore documenting some other ways of mounting CIFS/SMB volumes since people don't seem to be aware of them:

  • fstab (OS)
  • docker volumes with the cifs driver (OS+docker)
  • etc

Though at some point this is outside the scope of the image and more a pure documentation issue - and it's not realistic for us to document all third-party integrations. But maybe some hints + links to third-party docs

@juan11perez
Copy link

Gents,
I used the first example and worked fine for me.
I'm moving away from AIO and it did have smb.

@LevAnni777
Copy link

Anybody, please tell me if this bug will be fixed any time soon?

@joshtrichards
Copy link
Member Author

@LevAnni777 What bug are you referring to? The full example is valid / functions just fine.

@LevAnni777
Copy link

Truenas: TrueNAS SCALE Dragonfish
Nextcloud App: 29.0.3

Nextcloud runs without any errors.

When External SMB Storage is mounted in Nextcloud, the user experiences whole range of weird behaviors like:

Unable to list folder contents,
Unable to upload certain files, or more than few files at once,
Unable to download some files

Etc..

Meanwhile the nextcloud.log file generates these errors:

{"reqId":"7G6f9KKlCrUv8OAtpOOw","level":3,"time":"2024-07-20T14:47:10+00:00","remoteAddr":"192.168.2.235","user":"maka","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/maka/Home/All%20Pics/","message":"Undefined array key \"attributes\" at /var/www/html/app> {"reqId":"7G6f9KKlCrUv8OAtpOOw","level":3,"time":"2024-07-20T14:47:10+00:00","remoteAddr":"192.168.2.235","user":"maka","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/files/maka/Home/All%20Pics/","message":"Malformed state response from server","userAgent":"M>

Seems like there is no other way to either wait for docker publisher to update the smbclient package, or users like me are forced to build their own nextcloud docker container composed with a newer smbclient package :/ which involves far more knowledge than I have :/

@maxhoesel
Copy link

maxhoesel commented Sep 17, 2024

For anyone interested, I have ported over the SMB-specific adjustments from the full example to a custom SMB-only container image: https://github.com/spacebird-dev/nextcloud-docker-smb/pkgs/container/nextcloud-docker-smb. These images are automatically kept up-to-date and should be a drop-in replacement for the ones provided by this project. Should be useful for testing the different SMB implementations if nothing else :)

I did this because using the smb example (which uses the system-native smbclient) caused issues with my setup (same as documented in here) and I did not want to use the full image with supervisord.


Personally, I would really appreciate it if this project considered shipping php-smbclient as part of its base image. I (and seemingly quite a few others) use Nextcloud as a "frontend" to a SMB share that lives on a NAS. This allows me to use all of Nextclouds wonderful features without having to "lock into" Nextclouds file management structure. Having to build a custom image for SMB support makes deployments more complicated (especially on k8s with the community helm chart, where one can't easily rebuild a container).

While it is possible to mount SMB shares through the docker host (or as a PVC in k8s) and then include them as a "local" storage, I am not a fan of this approach as it couples user-specific configuration (external storage) to the way the application is installed (mount points of the SMB shares), when the native smbclient integration requires none of this.

As far as image size goes, my SMB-enabled image consumes about 40MB more than the official image. While that's significant, I think the trade-off in convenience wold be worth it for a lot of people including myself, especially since the base image is already quite chonky as-is:

image

Regarding what approach to use for the SMB implementation, the Nextcloud documentation says that the php-smbclient approach is preferred over the "native" solution:

The SMB/CIFS backend requires smbclient or the PHP smbclient module to be installed on the Nextcloud server. The PHP smbclient module is preferred, but either will work. These should be included in any Linux distribution. (See PECL smbclient if your distro does not include them.)

https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/external_storage/smb.html

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

No branches or pull requests

4 participants