Unable to share from SMB external storage

Nextcloud version: 17.0.1
Operating system and version: Debian 10
Apache or nginx version: Apache 2.4.38
PHP version: 7.3.11-1~deb10u1
Smbclient version: 4.9.5-Debian
php-smbclient installed

The issue you are facing:

I’m unable to create external sharing links from files/folders located on External Shares from SMB server.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Attach external storage, SMB share using Username/Password option;
  2. Select “Enable Sharing”;
  3. Checkmark turns into red exclamation mark;
  4. UI says Resharing is not allowed;
  5. Enable Sharing works on local folders or system mounted smb shares;

LOGS: no new entries when trying to Enable sharing. More like a silent error.

According to the documentation this setup should be supported. I’ve read some users had success with the ‘Login credentials, save in database’ but that didn’t seem to work for me.

Don’t know if they’re related but I’ve tried enabling SMB update notifications and I get the following error:

smbXcli_negprot_smb1_done: No compatible protocol selected by server.
Protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE

The SMB server is a FreeNAS machine with SMB1 disabled. I’ve set min protocol to SMB2 and max protocol to SMB3 in both NC machine and FreeNAS server.

I’ve setup a new Active Directory to troubleshoot this further and now I can’t add the external storage. So, previously, when I was using a SAMBA4 AD , I could mount the external storage but couldn’t enable external sharing and now with a Windows 2019 AD I can’t even mount the share.

The same server and path are working when mounted through fstab with the domain credentials and access them in NC as local storage.

I’ve also installed php-smbclient 0.9.0 but it doesn’t change anything.

I’ve changed smb.conf to client min SMB2 and max SMB3 or SMB2 - no change.

Btw I’m using FreeNAS with SMB1 disabled and I don’t have issues with linux/win/macos clients.

When trying to add the storage I get the following error:

Icewind\SMB\Exception\AuthenticationException: Invalid login

Detailed log:

"no app in context","method":"GET","url":"\/index.php\/apps\/files_external\/globalstorages\/32?testOnly=true","message":{"Exception":"Icewind\\SMB\\Exception\\AuthenticationException","Message":"Invalid login","Code":0,"Trace":[{"file":"\/var\/www\/html\/nextcloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/Wrapped\/Connection.php","line":44,"function":"checkConnectionError","class":"Icewind\\SMB\\Wrapped\\Parser","type":"->","args":["session setup failed: NT_STATUS_LOGON_FAILURE"]},{"file":"\/var\/www\/html\/nextcloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/Wrapped\/Share.php","line":96,"function":"clearTillPrompt","class":"Icewind\\SMB\\Wrapped\\Connection","type":"->","args":[]},{"file":"\/var\/www\/html\/nextcloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/Wrapped\/Share.php","line":109,"function":"getConnection","class":"Icewind\\SMB\\Wrapped\\Share","type":"->","args":[]},{"file":"\/var\/www\/html\/nextcloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/Wrapped\/Share.php","line":410,"function":"connect","class":"Icewind\\SMB\\Wrapped\\Share","type":"->","args":[]},{"file":"\/var\/www\/html\/nextcloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/Wrapped\/Share.php","line":175,"function":"execute","class":"Icewind\\SMB\\Wrapped\\Share","type":"->","args":["allinfo \"\""]},{"file":"\/var\/www\/html\/nextcloud\/apps\/files_external\/lib\/Lib\/Storage\/SMB.php","line":178,"function":"stat","class":"Icewind\\SMB\\Wrapped\\Share","type":"->","args":["\/"]},{"file":"\/var\/www\/html\/nextcloud\/apps\/files_external\/lib\/Lib\/Storage\/SMB.php","line":296,"function":"getFileInfo","class":"OCA\\Files_External\\Lib\\Storage\\SMB","type":"->","args":["\/"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Storage\/

any news ?