I have a CIFS filesystem mounted in an Oracle Linux 7 server:

//win-server/shared-folder on /data1/shared_folder type cifs (rw,relatime,vers=1.0,cache=strict,username=winuser,domain=mydomain.com,uid=1000,forceuid,gid=1000,forcegid,addr=,file_mode=0644,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=61440,wsize=65536,echo_interval=60,actimeo=1)

I have a file called test_file in /data1/shared_folder. When I try to rename it as TEST_FILE I receive the following error message:

$ mv test_file TEST_FILE
mv: ‘test_file’ and ‘TEST_FILE’ are the same file
$ echo $?

mv -f test_file TEST_FILE has the same result. I understand that this is related to the Windows server being case insensitive to the file names. But with a previous Red Hat Linux 5 server mounting the same CIFS filesystem, the same command did not show any message, and returned exit code 0. This is the behaviour that I need to replicate in the Oracle Linux 7 server.

I suspect this could be related to the mount.cifs options. I have tried the options cache=none ( suggested in https://superuser.com/questions/1132269/mv-command-reports-x-and-y-are-the-same-file-cifs-filesystem ), cache=loose, and ignorecase, but they did not help.

Any help would be appreciated, thanks!

Update: The options that I have indicated in /etc/fstab are:

  • 1
    I'd expect that ignorecase/nocase is the option that causes the issue. I believe case-sensitivity is the default if the server supports it, so I guess that means your server is claiming not to.
    – jhnc
    Feb 2, 2019 at 19:45
  • 1
    Is that an actual Windows server? Which version of Windows? Why are you forcing the connection to SMBv1? Feb 2, 2019 at 20:54
  • @MichaelHampton yes it is a windows server 2012 R2. I have not indicated the SMB version, it seems it is the default. Feb 2, 2019 at 22:53
  • @jhnc I have tried with ignorecase and without ignorecase. In both cases, the same result. Feb 2, 2019 at 23:07
  • @MichaelHampton I have just tried mounting the filesystem with vers=3.0, but same result Feb 2, 2019 at 23:08


You must log in to answer this question.

Browse other questions tagged .