Strange Problem related to SMB share and third party software after upgrade to 12

mzst

Cadet
Joined
Apr 27, 2020
Messages
8
Hello,
I used a software that acesses a database on a SMB share hosted by a Truenas server. Before i had Freenas and everything was working fine. I upgraded by importing the storage pool. Everything seemed fine but then i got an error whenever the software tried to access the database: "The Parameter is incorrect". I have full control permissions over the folder where the database is located. I already tried resetting the permissions, formatting the entire server, recreating the datasets, permissions, trying different ACL settings. Basically I am running out of ideias and have no way to troubleshoot the error. Does anyone has an idea of how i can find the problem? Thanks
 

Attachments

  • paramenter incorrect.png
    paramenter incorrect.png
    7.6 KB · Views: 130

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Hello,
I used a software that acesses a database on a SMB share hosted by a Truenas server. Before i had Freenas and everything was working fine. I upgraded by importing the storage pool. Everything seemed fine but then i got an error whenever the software tried to access the database: "The Parameter is incorrect". I have full control permissions over the folder where the database is located. I already tried resetting the permissions, formatting the entire server, recreating the datasets, permissions, trying different ACL settings. Basically I am running out of ideias and have no way to troubleshoot the error. Does anyone has an idea of how i can find the problem? Thanks
Let's start with the simple things. What is the output of 'testparm -s'?
 

mzst

Cadet
Joined
Apr 27, 2020
Messages
8
Hello, thanks for the quick reply. Here is the output:

Code:
Warning: settings changed through the CLI are not written to
the configuration database and will be reset on reboot.

root@TRUENAS[~]# testparm -s
Load smb config files from /usr/local/etc/smb4.conf
Loaded services file OK.
Weak crypto is allowed
Server role: ROLE_STANDALONE

# Global parameters
[global]
        aio max threads = 2
        bind interfaces only = Yes
        disable spoolss = Yes
        dns proxy = No
        enable web service discovery = Yes
        kernel change notify = No
        load printers = No
        logging = file
        max log size = 5120
        nsupdate command = /usr/local/bin/samba-nsupdate -g
        registry shares = Yes
        restrict anonymous = 2
        server role = standalone server
        server string = TrueNAS Server
        unix extensions = No
        username map = /usr/local/etc/smbusername.map
        username map cache time = 60
        idmap config *: range = 90000001-100000000
        idmap config * : backend = tdb
        directory name cache size = 0
        dos filemode = Yes


[xray-db]
        ea support = No
        path = /mnt/pool1/xray-db
        read only = No
        vfs objects = streams_xattr shadow_copy_zfs ixnas recycle crossrename aio_fbsd
        recycle:keeptree = yes
        recycle:subdir_mode = 0700
        recycle:versions = yes
        recycle:repository = .recycle/%U
        recycle:directory_mode = 0777
        recycle:touch = yes
        nfs4:chown = true


[xray-db2]
        ea support = No
        kernel share modes = No
        path = /mnt/pool1/xray-db2
        posix locking = No
        read only = No
        vfs objects = streams_xattr shadow_copy_zfs ixnas recycle crossrename aio_fbsd
        recycle:keeptree = yes
        recycle:subdir_mode = 0700
        recycle:versions = yes
        recycle:repository = .recycle/%U
        recycle:directory_mode = 0777
        recycle:touch = yes
        nfs4:chown = true


[shared-folder]
        ea support = No
        kernel share modes = No
        path = /mnt/pool1/shared-folder
        posix locking = No
        read only = No
        vfs objects = streams_xattr shadow_copy_zfs ixnas recycle crossrename aio_fbsd
        recycle:keeptree = yes
        recycle:subdir_mode = 0700
        recycle:versions = yes
        recycle:repository = .recycle/%U
        recycle:directory_mode = 0777
        recycle:touch = yes
        nfs4:chown = true
root@TRUENAS[~]#
 

ChrisRJ

Wizard
Joined
Oct 23, 2020
Messages
1,919
What database are we talking about? Putting the storage files of a database on an SMB share is often not supported or at least an edge-case. To ensure consistency, while aiming for the best possible performance at the same time, there are typically very strict requirements on the underlying file system. A local file system (or more generically a block device) behaves differently than a character device (like SMB or NFS).
 

mzst

Cadet
Joined
Apr 27, 2020
Messages
8
I think it is microsoft access based (file extension is .accdb). This is actually the only supported way of having multiple users work on the database. If i put it on a windows 10 client shared folder over the network it works normally and it worked flawlessly before with Freenas 11. Sorry for the slow replies but it seems i need moderator approval every time i post.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Try testing with disabling durable handles on the share. Barring that, typically there should be some particular SMB operation that is failing with a status code similar to what you're seeing in Windows. You can use wireshark to get a packet capture of what is happening to try to isolate it to a particular operation, which may give some clues about whether there are configuration changes that can be made to fix the issue.
 

mzst

Cadet
Joined
Apr 27, 2020
Messages
8
Thanks, I just tried disabling durable handles. It is still the same problem. I will try to use wireshark.
 

mzst

Cadet
Joined
Apr 27, 2020
Messages
8
Ok so i just tried to use wireshark to capture packes from client (192.168.0.102) to server (192.168.0.10) using the smb2 protocoll and this is what i got.


This shows a couple of the errors i get, the full text is too long to post here so i will post it here: https://pastebin.com/Wce7Ccu0
Code:
4668    22.233034    192.168.0.102    192.168.0.10    SMB2    378    Create Request File: Shared\Template2D\User;GetInfo Request FILE_INFO/SMB2_FILE_NETWORK_OPEN_INFO
4669    22.233695    192.168.0.10    192.168.0.102    SMB2    426    Create Response File: Shared\Template2D\User;GetInfo Response
4670    22.233752    192.168.0.102    192.168.0.10    SMB2    260    Find Request File: Shared\Template2D\User SMB2_FIND_ID_BOTH_DIRECTORY_INFO Pattern: *;Find Request File: Shared\Template2D\User SMB2_FIND_ID_BOTH_DIRECTORY_INFO Pattern: *
4671    22.234140    192.168.0.10    192.168.0.102    SMB2    434    Find Response;Find Response, Error: STATUS_NO_MORE_FILES
4672    22.234185    192.168.0.102    192.168.0.10    SMB2    146    Close Request File: Shared\Template2D\User
4673    22.234551    192.168.0.10    192.168.0.102    SMB2    182    Close Response
4674    22.235001    192.168.0.102    192.168.0.10    SMB2    370    Create Request File: Shared\SFPA\Document;GetInfo Request FS_INFO/FileFsFullSizeInformation
4675    22.236390    192.168.0.10    192.168.0.102    SMB2    402    Create Response File: Shared\SFPA\Document;GetInfo Response
4676    22.236430    192.168.0.102    192.168.0.10    SMB2    146    Close Request File: Shared\SFPA\Document
4677    22.236723    192.168.0.10    192.168.0.102    SMB2    182    Close Response
4684    22.768981    192.168.0.102    192.168.0.10    SMB2    186    Session Setup Request, NTLMSSP_NEGOTIATE
4685    22.769755    192.168.0.10    192.168.0.102    SMB2    296    Session Setup Response, Error: STATUS_MORE_PROCESSING_REQUIRED, NTLMSSP_CHALLENGE
4686    22.769937    192.168.0.102    192.168.0.10    SMB2    277    Session Setup Request, NTLMSSP_AUTH, User: \
4687    22.771287    192.168.0.10    192.168.0.102    SMB2    130    Session Setup Response
4688    22.771368    192.168.0.102    192.168.0.10    SMB2    174    Tree Connect Request Tree: \\192.168.0.10\xray-db
4689    22.772148    192.168.0.10    192.168.0.102    SMB2    138    Tree Connect Response
4690    22.772340    192.168.0.102    192.168.0.10    SMB2    274    Create Request File: Shared\PatDocDB.laccdb
4691    22.772971    192.168.0.10    192.168.0.102    SMB2    131    Create Response, Error: STATUS_ACCESS_DENIED
4692    22.773167    192.168.0.102    192.168.0.10    SMB2    274    Create Request File: Shared\PatDocDB.laccdb
4693    22.773810    192.168.0.10    192.168.0.102    SMB2    131    Create Response, Error: STATUS_OBJECT_NAME_NOT_FOUND
4694    22.773981    192.168.0.102    192.168.0.10    SMB2    274    Create Request File: Shared\PatDocDB.laccdb
4695    22.774578    192.168.0.10    192.168.0.102    SMB2    131    Create Response, Error: STATUS_ACCESS_DENIED
4696    22.774800    192.168.0.102    192.168.0.10    SMB2    274    Create Request File: Shared\PatDocDB.laccdb
4697    22.775274    192.168.0.10    192.168.0.102    SMB2    131    Create Response, Error: STATUS_ACCESS_DENIED
4699    22.896591    192.168.0.102    192.168.0.10    SMB2    274    Create Request File: Shared\PatDocDB.laccdb
4700    22.897260    192.168.0.10    192.168.0.102    SMB2    131    Create Response, Error: STATUS_ACCESS_DENIED
4701    22.897728    192.168.0.102    192.168.0.10    SMB2    274    Create Request File: Shared\PatDocDB.laccdb
4702    22.898309    192.168.0.10    192.168.0.102    SMB2    131    Create Response, Error: STATUS_ACCESS_DENIED
4703    22.898673    192.168.0.102    192.168.0.10    SMB2    274    Create Request File: Shared\PatDocDB.laccdb
4704    22.899225    192.168.0.10    192.168.0.102    SMB2    131    Create Response, Error: STATUS_ACCESS_DENIED
4705    22.932929    192.168.0.102    192.168.0.10    SMB2    444    Create Request File: Shared;Find Request SMB2_FIND_ID_BOTH_DIRECTORY_INFO Pattern: *;Find Request SMB2_FIND_ID_BOTH_DIRECTORY_INFO Pattern: *
4708    22.933955    192.168.0.10    192.168.0.102    SMB2    842    Create Response File: Shared;Find Response;Find Response, Error: STATUS_NO_MORE_FILES
4710    22.934050    192.168.0.102    192.168.0.10    SMB2    146    Close Request File: Shared
4711    22.934359    192.168.0.10    192.168.0.102    SMB2    182    Close Response
4712    22.934505    192.168.0.102    192.168.0.10    SMB2    414    Create Request File: Shared\GraphicOptions.dat
4713    22.935249    192.168.0.10    192.168.0.102    SMB2    406    Create Response File: Shared\GraphicOptions.dat
4714    22.935357    192.168.0.102    192.168.0.10    SMB2    162    GetInfo Request SEC_INFO/SMB2_SEC_INFO_00 File: Shared\GraphicOptions.dat
4715    22.935925    192.168.0.10    192.168.0.102    SMB2    131    GetInfo Response, Error: STATUS_ACCESS_DENIED
4716    22.936355    192.168.0.102    192.168.0.10    SMB2    171    Read Request Len:2171 Off:0 File: Shared\GraphicOptions.dat
4718    22.936884    192.168.0.10    192.168.0.102    SMB2    849    Read Response
4720    22.992693    192.168.0.102    192.168.0.10    SMB2    274    Create Request File: Shared\PatDocDB.laccdb
4721    22.993384    192.168.0.10    192.168.0.102    SMB2    131    Create Response, Error: STATUS_ACCESS_DENIED
4722    22.994100    192.168.0.102    192.168.0.10    SMB2    274    Create Request File: Shared\PatDocDB.laccdb
4723    22.994675    192.168.0.10    192.168.0.102    SMB2    131    Create Response, Error: STATUS_ACCESS_DENIED
4724    22.995117    192.168.0.102    192.168.0.10    SMB2    274    Create Request File: Shared\PatDocDB.laccdb
4725    22.995681    192.168.0.10    192.168.0.102    SMB2    131    Create Response, Error: STATUS_ACCESS_DENIED
4729    23.056672    192.168.0.102    192.168.0.10    SMB2    282    Create Request File: Shared\~PatDocDB.ini.[Lock]
4730    23.057129    192.168.0.10    192.168.0.102    SMB2    131    Create Response, Error: STATUS_ACCESS_DENIED
4732    23.088761    192.168.0.102    192.168.0.10    SMB2    282    Create Request File: Shared\~PatDocDB.ini.[Lock]
4733    23.089609    192.168.0.10    192.168.0.102    SMB2    131    Create Response, Error: STATUS_ACCESS_DENIED
4734    23.090030    192.168.0.102    192.168.0.10    SMB2    282    Create Request File: Shared\~PatDocDB.ini.[Lock]
4735    23.090598    192.168.0.10    192.168.0.102    SMB2    131    Create Response, Error: STATUS_ACCESS_DENIED
4737    23.150749    192.168.0.102    192.168.0.10    SMB2    274    Create Request File: Shared\PatDocDB.laccdb
4738    23.151561    192.168.0.10    192.168.0.102    SMB2    131    Create Response, Error: STATUS_ACCESS_DENIED
4739    23.152062    192.168.0.102    192.168.0.10    SMB2    274    Create Request File: Shared\PatDocDB.laccdb
4740    23.152650    192.168.0.10    192.168.0.102    SMB2    131    Create Response, Error: STATUS_ACCESS_DENIED
4741    23.152866    192.168.0.102    192.168.0.10    SMB2    274    Create Request File: Shared\PatDocDB.laccdb
4742    23.153389    192.168.0.10    192.168.0.102    SMB2    131    Create Response, Error: STATUS_ACCESS_DENIED
4744    23.336029    192.168.0.102    192.168.0.10    SMB2    398    Create Request File: Shared\Network.dat
4745    23.336843    192.168.0.10    192.168.0.102    SMB2    406    Create Response File: Shared\Network.dat
4746    23.336978    192.168.0.102    192.168.0.10    SMB2    162    GetInfo Request SEC_INFO/SMB2_SEC_INFO_00 File: Shared\Network.dat
4747    23.337538    192.168.0.10    192.168.0.102    SMB2    131    GetInfo Response, Error: STATUS_ACCESS_DENIED
4748    23.337976    192.168.0.102    192.168.0.10    SMB2    171    Read Request Len:23567 Off:0 File: Shared\Network.dat
4767    23.339276    192.168.0.10    192.168.0.102    SMB2    345    Read Response
4769    23.342051    192.168.0.102    192.168.0.10    SMB2    162    GetInfo Request FILE_INFO/SMB2_FILE_STREAM_INFO File: Shared\Network.dat
4770    23.342490    192.168.0.10    192.168.0.102    SMB2    168    GetInfo Response
4772    23.406726    192.168.0.102    192.168.0.10    SMB2    146    Close Request File: Shared\Network.dat
4773    23.407367    192.168.0.10    192.168.0.102    SMB2    182    Close Response
 

mzst

Cadet
Joined
Apr 27, 2020
Messages
8
From what i can understand from the logs, i am getting an access denied error. Now that is very odd because i have full read/write access and can browse to the .accdb file and modify it in windows explorer without problems. The other file (.laccdb) is a lock file created by the program to prevent other users from changing things while the database is being accessed. Not sure why it can create the file but then has no access. Right now i am stuck. Is there anything else i can try?
 

zac2b

Cadet
Joined
Jun 27, 2022
Messages
1
Hi, have you managed to solve the issue. It seem I'm dealing with the same problem :-/

From what i can understand from the logs, i am getting an access denied error. Now that is very odd because i have full read/write access and can browse to the .accdb file and modify it in windows explorer without problems. The other file (.laccdb) is a lock file created by the program to prevent other users from changing things while the database is being accessed. Not sure why it can create the file but then has no access. Right now i am stuck. Is there anything else i can try?
 

mzst

Cadet
Joined
Apr 27, 2020
Messages
8
Hi, have you managed to solve the issue. It seem I'm dealing with the same problem :-/
Hi, unfortunately not. I am hoping that a future update solves the issue. If you figure it out let me know
 
Top