-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[Bug]: renaming file by just changing case leads to strange results (on SMB storage and others) #40690
Comments
This may or may not be NC issue, but you'll need to dig a bit deeper into your SMB server's configuration and SMB implementation to help get to the bottom of the matter (your SMB server's underlying OS and OS version are a factor too). It sounds like a bit like case sensitivity and/or case preservation is disabled on your SMB server (or any number of related options that depend on what your specific SMB server implementation supports). Please check the manual for your SMB server to determine what it supports in terms of case preservation and sensitivity. You may just need to adjust some options. If it's really old (or oddly configured) there may even be some name mangling involved. |
Thanks for your feedback. The server runs Samba ( I can set |
I can reproduce this error when using NC in docker and mounting the data volume
from nextcloud.log |
cc @icewind1991 , @artonge |
I finally found some time to test further: 1. Test with Samba default settings
My test steps: WebGUI
Nextcloud Client
SMB-mount
2. Test with case sensitivity
My test steps:
3. Preliminary conclusion
|
I feel like the issue lies with how the share is mounted via libsmbclient. I still haven't figured out how nextcloud specifies options to libsmbclient when mounting the share. The following options: vers=3.0,_netdev,credentials=/my_path/.secrets/.smb,iocharset=utf8,gid=100033,uid=100033,file_mode=0777,dir_mode=0777,sec=ntlmv2,cache=none,noserverino allow linux to do a 'mv t.txt T.txt' without a problem. Using: I get this file name already exists error directly in linux terminal. Some post I crossed when searching for the issue referenced cache being a problem and setting cache=none helped resolve that. Not quite sure if switching to vers=3.0 or the noserverio options have any effect, but came with the suggestion from the post I found online. Can anyone point me in the right direction where I can try specifying the SMB mount options values for testing? |
Bug description
Renaming an object (here folder/directory) on external storage connected via SMB leads to strange results depending on the client.
WebGUI:
99_test
to99_TEST
produces an error message saying that the name is already in use and that I should use a different name99_test
AND99_TEST
99_test
it also shows in99_TEST
and vice versa99_test
Nextcloud client (Windows) with virtual files:
99_test
to99_TEST
produces an error message saying that it failed caused by a protocol error99_test
, sync status remains active99_test
fails in client and WebGUI, folder is dysfunctionalSteps to reproduce
Expected behavior
renaming by just changing case is detected by WebGUI and Nextcloud client as illegal on SMB storage and no file operations are executed.
Installation method
Other Community project
Nextcloud Server version
27
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.2
Web server
Nginx
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
The text was updated successfully, but these errors were encountered: