-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with Accessing folder with many subfolders (NTFS) #391
Comments
Please share your smb.conf. What is the memory error ? Is that on the server side or client side ? On Linux, you shouldn't need to specify a version (it will pick smb3.1.1 dialect automatically) What's the error when trying to connect with Windows 11 (SMB1 disabled) ? Are you using authenticated or guest access ? |
`[global] ######### Dynamic written config options ######### [TV] [MV] Error is: On Windows 11, I can't even access the router. It can't find the host. Like as if I'm typing incorrect IP. I'm using authenticated access. |
Remove these:
then restart ksmbd and retest. For the windows issue, enable debug on the server, by running the following command as root: This will make ksmbd log messages, which you can retrieve by dmesg or through the syslog daemon. Then try to connect, and paste the debug log. |
Thanks for the prompt reply. I removed the lines, restarted (actually restarted the whole router), and still the same. On the Linux Box, I don't see the folder empty, as well as if I check it from WinSCP. (though I created a subfolder in that folder as mounted as a Samba share on the Linux Box, didn't see it of course, but then when I looked at the mounted folder on the router, the folder was actually created). I got the following error though when trying to open the problematic folder from the Linux machine And below is some of the log related to ksmbd, in case any of it is useful. I got nothing when trying ot access the fodler form the Windows Machine by ther way
|
Isn't 1MB read/write size too large for your HW (RAM)? As far as I know, I remember that the openWRT mainline was set to 64KB. please try it after changing 1024K to 64K.
|
The issue was there with the original settings. That's why I put the 1024K in the first place. Anyway, I put 64K and got the same error. Router is Archer C7, has 57 MiB available right now. |
Okay, Can I think that windows 10 is not a problem and it is only a problem with windows 11 ? And can it be said that only NTFS is the problem and there is no problem with ext4 or other FS? I'd like to narrow the problem down a bit. |
-12 errno is -ENOMEM, i.e. this error is returned when memory is lacked. |
@hegabo
|
I tried from a different laptop, running Windows 10. It shows the shares when I browse the IP of the router (unlike Windows 11 which gives me an error message that the host doesn't exist). However, in Windows 10, if I try to open one of the shares (I have 2 drives) it asks for credentials. I provide them but it gives me an error message as if the credentials are incorrect. I disabled SMB1 on Windows 10 and still the same. Nothing in system log about that. |
Both ksmbd-server and -utils are 3.4.2-1.
And in Windows 10 now (SMB1 disabled) I see the following (and nothing on Windows 10 machine---takes forever and doesn't browse the IP
|
@hegabo Can you give me tcpdump(or wireshark dump) on problem situation ? and don't set mb2 max credits = 256 |
@namjaejeon THanks. Sent by email. |
@namjaejeon, @mmakassikis Any update? Thanks. |
@hegabo How many subfolders do you have in the share ? For NTFS access, are you using ntfs-3g ? |
I am on Windows and never tried compiling packages before. I could try though. Do you expect this to solve the subfolders issue or accessing the share ofrm Windows 11? The subfolders were about 1550 (not counting their recursive subfolders). It's probably wroth mentioning that this issue seems to be particular to SMB 1.0 (somehow), as I don't see this problem now if I try to access that folder from Android. The current problem I have now is with accessing the share itself from Windows 11. I'm using kmod-fs-antfs. (but I think I initially tried ntfs-3g). |
You're describing multiple issues:
These may be related, and some may have already been fixed. Windows defaults to SMB1 disabled: why are you saying the issue is related to SMB1 ? Can you try without SMB1 (disable it on Windows, and set Do you have this issue only on Windows 11 ? Do you have any other client to test from (windows 10, linux, smartphone app, etc) ? |
I tried different things, including trying enabling SMB1 on both server and Windows client, so can't be 100% sure of correlation, but the conclusion that makes sense is as follows:
|
Clients will try to negotiate a protocol version. This can happen with either a SMB2 negotiate command, or a SMB1 negotiate, that can result in a SMB1 connection, or can be upgraded to an SMB2 connection. There is a bug that was fixed in 5354422 that results in a failed negotiation. I'm not sure if the bug was there in 3.4.2. It would be great if you could test with the latest code. It's possible you're seeing a bug that was already fixed (or there is a bug with Windows 11 clients). |
Thanks. I figured as much, but I'm not interested in solving the issue with SMB1 and too-many-subfolders because it's an outdated, insecure protocol. So I think the main issue is with accessing the share from Windows 11. I will try to compile the packages, if not then I will just wait for the new release. Thanks |
I tried different things, including trying enabling SMB1 on both server and Windows client, so can't be 100% sure of correlation, but the conclusion that makes sense is as follows:
|
OK I did some more trials and came up to the following conclusion (I think): With /etc/ksmbd/smb.con:
With guest disabled, Windows 11 doesn't open the server at all, Windows 10 Opens the server, asks for credentials when I open the share but rejects them, even though they are correct. If I allow guest access on the shares, Windows 10 can access the share but not that large folder (the one with too many subfolders Windows 11 still doesn't open the server at all. Cx File Explorer on Android opens the server, sees the share and opens the large folder. |
@hegabo Okay. I don't have windows 11 client yet. It is hard to reproduce it right now.
What is meaning "guest disabled" ? How do you turn guest on/off in smb.conf ? |
Not sure what do you mean. |
@hegabo
Which means there's another file which contains something like this:
Can you share the contents of that file ? In ksmbd docs it's smbpwd.db -- not sure what OpenWRT calls it. |
ksmbdpwd.db |
NTFS USB HDD connected and mounted properly; I can see the contents of the hard disk on the mounted location. Though for the samba clients, I have the following:
The text was updated successfully, but these errors were encountered: