FreeNAS as external storage in Nextcloud

His.Dudeness

Dabbler
Joined
May 14, 2019
Messages
15
Hi,

I’ve got a FreeNAS as NAS/fileserver that is a member of my active directory.
I also got a nextcloud on a different machine inside a docker container (login via LDAP to AD)

Now I would like to use the “external storage” feature in nextcloud to access SMB shares on FreeNAS

A user has access to the SMB shares on FreeNAS and can access them from a windows machine that is also domain joined.
The same user can add an external storage within nextcloud that is hosted on a SMB share on a Win10 machine
He cannot add an external storage within nextcloud that is hosted on FreeNAS

Any idea what might be different when accessing shares on a Windows host to shares on FreeNAS when coming from nextcloud?

I already played around with enabling SMB1 and NTLMv1, but it didn’t help. SMB1 is also deactivated on the Win10 host and nextcloud can mount shares from there

FreeNAS Version: 11.2 U6
Nextcloud version 16.0.4-0

cheers and thanks in advance
Michael
 

His.Dudeness

Dabbler
Joined
May 14, 2019
Messages
15
Were you able to resolve this?
I think I found it:
For some reason NetBIOS alias and workgroup were both set to the name of the Workgroup in the SMB service config.
I can't remember setting the alias at all.... Was it already there in earlier versions of FreeNAS ?

Aftrer removing the the alias Nexcloud can connect :smile:
I was able to reproduce the issue by adding the alias again.

If I added the alias in a moment of stupidity – shame on me.
If the alias is added by setup during the upgrade procedure someone might want to correct this.
 
D

dlavigne

Guest
If the alias is added by setup during the upgrade procedure someone might want to correct this.

It shouldn't as the upgrade process brings in previously configured settings and adds the logic for any new configuration fields introduced by the update.
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
Hi Dudeness,

Be careful here... I do not recommend you to do that. Nextcloud relies on a database to keep track of everything. New files, modification, versions, etc. When asking for a directory listing, Nextcloud does not actually list the content of the directory using an equivalent of "ls". It goes to its database and retrieve the information from there.

What you just did is to bypass that frontend and manipulate files directly behind Nextcloud's back. The result is that the database will now always be out of sync. Yes Nextcloud can re-scan and re-sync, but such a permanent break-N-fix is not a clean solution.

I recommend you use only Nextcloud. For that, install the desktop client on your system and access your files locally. The agent will then re-sync the server using its frontend, so there will be no de-sync at the database level.

If you do a permanent break-n-fix, one day you will end up breaking things that will not be fixable...
 

His.Dudeness

Dabbler
Joined
May 14, 2019
Messages
15
It shouldn't as the upgrade process brings in previously configured settings and adds the logic for any new configuration fields introduced by the update.

Jep, then I guess I probably made a mistake and filled out the Alias filed incorrectly...
 

His.Dudeness

Dabbler
Joined
May 14, 2019
Messages
15
Hi Dudeness,

Be careful here... I do not recommend you to do that. Nextcloud relies on a database to keep track of everything. New files, modification, versions, etc. When asking for a directory listing, Nextcloud does not actually list the content of the directory using an equivalent of "ls". It goes to its database and retrieve the information from there.

What you just did is to bypass that frontend and manipulate files directly behind Nextcloud's back. The result is that the database will now always be out of sync. Yes Nextcloud can re-scan and re-sync, but such a permanent break-N-fix is not a clean solution.

I recommend you use only Nextcloud. For that, install the desktop client on your system and access your files locally. The agent will then re-sync the server using its frontend, so there will be no de-sync at the database level.

If you do a permanent break-n-fix, one day you will end up breaking things that will not be fixable...

Hi Heracles!

Thanks for your reply! I am not trying to bypass Nextcloud.
I am using the "external storage" feature from Nextcloud. A user (me) can add an external storage (SMB in LAN, FTP, S3, etc) via the Nextcloud web UI.
I think when using the external storage feature, nextcloud refreshes the directory content ever time a folder is accessed...

With the faulty configured Netbios alias in FreeNAS, nextcloud wasn't able to attach that SMB share. I was a little bit confused because there were countless forum posts around this topic in the past concerning SMB version incompatibility.

cheers
Michael
 
Top