I'm trying to set up NextCloud so I can remotely access my files. My files are primarily accessed via a SMB share in FreeNAS (11.2-U3). I have three users of the SMB shares, and all the shares/permissions are working great on the Windows machines that access them.
I have installed the NextCloud plugin. I even got SSL working, because that seemed like a good idea if I was doing remote access. I have enabled the "External storages" app. Because the plugin didn't support SMB out of the box, I installed the smbclient that matched the php version (7.1.28) by running:
After restarting the plugin, I am now able to use an "SMB / CIFS" external storage in NextCloud. Unfortunately, nothing I put in the configuration seems to work. All combinations of shares, domains, usernames, and hosts I can think of results in a red circle with an exclamation point (what I gather is the generic "error" icon).
I did some searching, and I found that SMB1 has been disabled in FreeNAS, so I added this tunable:
Variable: freenas.services.smb.config.server_min_protocol
Value: NT1
Type: Sysctl
(I realize it's not a great idea from a security standpoint, but at this point I'm just going for whatever I can get working -- I'll dial the openness back once it's working!)
As far as I can tell, this hasn't had any effect (even after restarting the SMB service).
In my testing, I have discovered smbclient in the Nextcloud jail is also unable to see the shares.
just prints this and exits: "Connection to 192.168.9.200 failed (Error NT_STATUS_IO_TIMEOUT)"
I get the same error message if I specify a username/password, or if I use the hostname instead of the IP address. I'm unable to ping the SMB host (the FreeNAS host itself) from the jail, but I'm not sure if that's an error or not. Both host and jail are in 192.168.9.*, so I wouldn't expect communication to be an issue there, but maybe FreeNAS doesn't respond to pings from jails for some reason (I don't have what I would consider a lot of experience with FreeNAS or FreeBSD in general).
For reference, here's my incredibly-sparse smb4.conf file from the NextCloud jail:
After all this, I considered simply mounting the dataset into the NextCloud jail directly, but I worry that will wreak havoc with the file permissions. Because this will be used for remote file access, I want to both read and write files (including updating existing files) without breaking the permissions for the Windows PCs that are the primary users of the data. I feel like SMB is the solution to my problem, I just don't know how to go about fixing it.
Has anyone had similar problems accessing SMB shares in a jail, or am I missing something completely obvious? Thanks for any advice.
I have installed the NextCloud plugin. I even got SSL working, because that seemed like a good idea if I was doing remote access. I have enabled the "External storages" app. Because the plugin didn't support SMB out of the box, I installed the smbclient that matched the php version (7.1.28) by running:
Code:
pkg install php71-pecl-smbclient
After restarting the plugin, I am now able to use an "SMB / CIFS" external storage in NextCloud. Unfortunately, nothing I put in the configuration seems to work. All combinations of shares, domains, usernames, and hosts I can think of results in a red circle with an exclamation point (what I gather is the generic "error" icon).
I did some searching, and I found that SMB1 has been disabled in FreeNAS, so I added this tunable:
Variable: freenas.services.smb.config.server_min_protocol
Value: NT1
Type: Sysctl
(I realize it's not a great idea from a security standpoint, but at this point I'm just going for whatever I can get working -- I'll dial the openness back once it's working!)
As far as I can tell, this hasn't had any effect (even after restarting the SMB service).
In my testing, I have discovered smbclient in the Nextcloud jail is also unable to see the shares.
Code:
smbclient -L 192.168.9.200
I get the same error message if I specify a username/password, or if I use the hostname instead of the IP address. I'm unable to ping the SMB host (the FreeNAS host itself) from the jail, but I'm not sure if that's an error or not. Both host and jail are in 192.168.9.*, so I wouldn't expect communication to be an issue there, but maybe FreeNAS doesn't respond to pings from jails for some reason (I don't have what I would consider a lot of experience with FreeNAS or FreeBSD in general).
For reference, here's my incredibly-sparse smb4.conf file from the NextCloud jail:
Code:
root@nextcloud:~ # cat /usr/local/etc/smb4.conf [global] workgroup = WORKGROUP dos charset = cp850 unix charset = ISO-8859-1 root@nextcloud:~ #
After all this, I considered simply mounting the dataset into the NextCloud jail directly, but I worry that will wreak havoc with the file permissions. Because this will be used for remote file access, I want to both read and write files (including updating existing files) without breaking the permissions for the Windows PCs that are the primary users of the data. I feel like SMB is the solution to my problem, I just don't know how to go about fixing it.
Has anyone had similar problems accessing SMB shares in a jail, or am I missing something completely obvious? Thanks for any advice.