Nextcloud SMB access thru php-smbclient problem and fix

Issues related to applications and software problems and general support
Post Reply
User avatar
Nicram
Posts: 3
Joined: 2014/03/09 18:29:29
Location: PL
Contact:

Nextcloud SMB access thru php-smbclient problem and fix

Post by Nicram » 2021/11/20 18:19:37

Hello
I think someone can find this helpful with similar problem that is:
Adding SMB share as External Storage do not work because wrong username and password even when they are correct (and working in every other way).
The problem is with smbclient library (or with php-smbclient library according to people from RHEL bugzilla).

Some time ago i had problem with this. At some moment in time i noticed that i do not have access to my external storage (SMB) that was working fine earlier (using Guest as user and password because i want Nextcloud to read files only). I made many tests using CentOS 8 and RHEL 8. On both the problem was updated libsmbclient. After update of that library something is happening and php-smbclient isn't working anymore like it should.
The solution is to remove php-libsmbclient.
Or downgrade libsmbclient version in the OS.

1st. solution:
# dnf - remove php-smbclient

2nd. solutions (is better one, php-smbclient make SMB working more stable with Nextcloud):
# rpm -e --nodeps libsmbclient
# dnf download libsmbclient-4.12.3-12.el8.3
# rpm -Uvh --nodeps libsmbclient-4.12.3-12.el8.3.x86_64.rpm

It is good to add smbclient to exclude line in /etc/dnf/dnf.conf (exclude=libsmbclient).

RHEL Bugzilla report: https://bugzilla.redhat.com/show_bug.cgi?id=1970328
Nextcloud problem report: https://github.com/nextcloud/server/issues/27046

@gdh it may be some hint for You (i saw You were asking about Nextcloud here).
@remirepo since i was always using Your repo for php-smbclient i think You may find this interesting too! Thank You for great work!
gdh wrote:
2020/01/20 18:29:52
remirepo wrote:
2020/01/20 07:20:21
Usually, additional PHP extension are available in EPEL

But for 8, EPEL is blocked by infrastructure issue 75
https://pagure.io/epel/issue/75

So for now, you have to build from sources or use my repository.
thanks for your reply.

I am not soo much into linux, would you mind to guide me, how I can build from sources?

have red it so many times but never felt able to just do it.

would appreciate some support

edit:During problem googling I found several times your repo, thank you for giving something back to the community :)
CentOS Lover

Post Reply