Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Samba] Cannot change case of existing file names

11 views
Skip to first unread message

Jordan Russell

unread,
Feb 5, 2007, 10:50:05 PM2/5/07
to
Server OS: Linux / Fedora Core 6
Samba version: 3.0.24, 3.0.23 (binary packages for FC6)
Samba configuration: All defaults
Client OS: Windows XP SP2, Windows 2000 SP4

In recent versions of Samba (including 3.0.24), attempting to rename a
file to a new name that differs only in case appears to have no effect:

X:\tmp>echo . > FILE.txt

X:\tmp>dir
02/05/2007 08:21p 4 FILE.txt

X:\tmp>ren FILE.txt file.txt

X:\tmp>dir
02/05/2007 08:21p 4 FILE.txt

I'm pretty sure this worked in older versions.
Any ideas?

Thanks.

--
Jordan Russell

--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba

Michael Gasch

unread,
Feb 6, 2007, 6:30:12 AM2/6/07
to
what are your settings concerning case mangling?

cheerz

Jordan Russell wrote:
> Server OS: Linux / Fedora Core 6
> Samba version: 3.0.24, 3.0.23 (binary packages for FC6)
> Samba configuration: All defaults
> Client OS: Windows XP SP2, Windows 2000 SP4
>
> In recent versions of Samba (including 3.0.24), attempting to rename a
> file to a new name that differs only in case appears to have no effect:
>
> X:\tmp>echo . > FILE.txt
>
> X:\tmp>dir
> 02/05/2007 08:21p 4 FILE.txt
>
> X:\tmp>ren FILE.txt file.txt
>
> X:\tmp>dir
> 02/05/2007 08:21p 4 FILE.txt
>
> I'm pretty sure this worked in older versions.
> Any ideas?
>
> Thanks.
>

--
Michael Gasch
Max Planck Institute for Evolutionary Anthropology
Department of Human Evolution (IT Staff)
Deutscher Platz 6
D-04103 Leipzig
Germany

Phone: 49 (0)341 - 3550 137
49 (0)341 - 3550 374

Fax: 49 (0)341 - 3550 399

Jordan Russell

unread,
Feb 6, 2007, 1:50:16 PM2/6/07
to
Michael Gasch wrote:
> what are your settings concerning case mangling?

As mentioned, I'm using all defaults. Grepping for "case" in smb.conf
doesn't yield any matches.

Note that I am able to create new files with all-lowercase letters. I
just can't rename an existing "FILE.txt" to "file.txt".

--
Jordan Russell

Gerald (Jerry) Carter

unread,
Feb 7, 2007, 6:22:38 AM2/7/07
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jordan Russell wrote:

> In recent versions of Samba (including 3.0.24), attempting
> to rename a file to a new name that differs only in
> case appears to have no effect:

If it did ever work, it was a fluke. Renaming
files to different case on a caseless filesystem
(or filesystem protocol) doesn't make much sense.

cheers, jerry
=====================================================================
Samba ------- http://www.samba.org
Centeris ----------- http://www.centeris.com
"What man is a man who does not make the world better?" --Balian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFybQgIR7qMdg1EfYRAj7ZAKDd/nzgFerB6wn0K+zK8PS4dKlJxgCg81Jc
WDYYJc9xgyX56HQ4VUEqavM=
=wgrk
-----END PGP SIGNATURE-----

Mac

unread,
Feb 7, 2007, 6:50:11 AM2/7/07
to
>Date: Tue, 06 Feb 2007 12:15:49 -0600
>From: Jordan Russell <jr-lis...@quo.to>
>To: Michael Gasch <ga...@eva.mpg.de>

>
>Note that I am able to create new files with all-lowercase letters. I
>just can't rename an existing "FILE.txt" to "file.txt".

>From what client?

MS Windows doesn't distinguish between those two names, so it won't let
you perform the re-name as it thinks you're not changing the name.

You can do it in Windows as a two-step process:-

Rename FILE.txt to anything.txt

Rename anything.txt to file.txt


Oh the joys of Windows.....


Mac
Assistant Systems Administrator @nibsc.ac.uk
m...@nibsc.ac.uk
Work: +44 1707 641565 Everything else: +44 7956 237670 (anytime)

Jordan Russell

unread,
Feb 7, 2007, 1:30:17 PM2/7/07
to
Gerald (Jerry) Carter wrote:
> If it did ever work, it was a fluke. Renaming
> files to different case on a caseless filesystem
> (or filesystem protocol) doesn't make much sense.

Erm, why would it be a "fluke"? You can do this on local filesystems (as
far back as Windows 95, at least), and you can do this on shares exposed
by Windows servers. Only when talking to a (recent) Samba server does it
fail to rename the file.

(How I noticed this problem: I have an rsync-like program that mirrors
the contents of a local directory to a remote system. One thing it
checks for is discrepancies in the case of filenames; if it finds any,
it corrects them. This feature works on Windows servers, and up until
recently, I'm fairly certain that it worked on Samba servers as well.
Now, when talking to Samba servers, the program just finds more and more
case discrepancies each time it runs, because it can never correct them.)

--
Jordan Russell

Gerald (Jerry) Carter

unread,
Feb 7, 2007, 1:40:13 PM2/7/07
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jordan Russell wrote:
> Gerald (Jerry) Carter wrote:
>> If it did ever work, it was a fluke. Renaming
>> files to different case on a caseless filesystem
>> (or filesystem protocol) doesn't make much sense.
>
> Erm, why would it be a "fluke"? You can do this on
> local filesystems (as far back as Windows 95, at least), and
> you can do this on shares exposed by Windows servers.
> Only when talking to a (recent) Samba server does it
> fail to rename the file.

File a bug please. Although in ge grand scheme of things
this would be low priority to me. Maybe Jeremy feels differently.
He lives in the file serving code more than I do.


cheer,s jerry


=====================================================================
Samba ------- http://www.samba.org
Centeris ----------- http://www.centeris.com
"What man is a man who does not make the world better?" --Balian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFyhs+IR7qMdg1EfYRAjw9AKDs+QDg+XykJ1Dgzfg3FPxiMxsHagCfaSQM
DsFDNFnHkaxfFbVKL/XIj8M=
=CZiE
-----END PGP SIGNATURE-----

Jeremy Allison

unread,
Feb 7, 2007, 1:40:13 PM2/7/07
to
On Wed, Feb 07, 2007 at 05:12:32AM -0600, Gerald (Jerry) Carter wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Jordan Russell wrote:
>
> > In recent versions of Samba (including 3.0.24), attempting
> > to rename a file to a new name that differs only in
> > case appears to have no effect:
>
> If it did ever work, it was a fluke. Renaming
> files to different case on a caseless filesystem
> (or filesystem protocol) doesn't make much sense.

No, someone did log a bug on this once and I did
fix it :-). The thing to do is test with smbclient
to see if my fix still works - Windows exporer
canonicalizes the name so you can't use that.

Jeremy.

Jordan Russell

unread,
Feb 7, 2007, 2:00:19 PM2/7/07
to
Mac wrote:
> MS Windows doesn't distinguish between those two names, so it won't let
> you perform the re-name as it thinks you're not changing the name.

That's actually not true; Windows-hosted filesystems allow it.

--- Test on local Windows 2000 file system ---

C:\>echo . > FILE.txt

C:\>dir
02/07/2007 12:11p 4 FILE.txt

C:\>ren FILE.txt file.txt

C:\>dir
02/07/2007 12:11p 4 file.txt

--- Test on remote share hosted by Windows 2000 server ---

J:\>echo . > FILE.txt

J:\>dir
02/07/2007 12:12p 4 FILE.txt

J:\>ren FILE.txt file.txt

J:\>dir
02/07/2007 12:12p 4 file.txt

--
Jordan Russell

Jordan Russell

unread,
Feb 7, 2007, 2:20:19 PM2/7/07
to
Gerald (Jerry) Carter wrote:
> File a bug please. Although in ge grand scheme of things
> this would be low priority to me. Maybe Jeremy feels differently.
> He lives in the file serving code more than I do.

Okay, done:
https://bugzilla.samba.org/show_bug.cgi?id=4377

--
Jordan Russell

Jeremy Allison

unread,
Feb 7, 2007, 5:30:08 PM2/7/07
to
On Mon, Feb 05, 2007 at 09:33:35PM -0600, Jordan Russell wrote:
> Server OS: Linux / Fedora Core 6
> Samba version: 3.0.24, 3.0.23 (binary packages for FC6)
> Samba configuration: All defaults
> Client OS: Windows XP SP2, Windows 2000 SP4
>
> In recent versions of Samba (including 3.0.24), attempting to rename a
> file to a new name that differs only in case appears to have no effect:
>
> X:\tmp>echo . > FILE.txt
>
> X:\tmp>dir
> 02/05/2007 08:21p 4 FILE.txt
>
> X:\tmp>ren FILE.txt file.txt
>
> X:\tmp>dir
> 02/05/2007 08:21p 4 FILE.txt
>
> I'm pretty sure this worked in older versions.
> Any ideas?

I've just fixed this in SVN. Turns out it was side-effect
breakage when we turned on root dfs by default. That was
a fun one - allowed me to clean up some old DFS code :-).

Jeremy.

Jordan Russell

unread,
Feb 7, 2007, 5:50:07 PM2/7/07
to
Jeremy Allison wrote:
> I've just fixed this in SVN. Turns out it was side-effect
> breakage when we turned on root dfs by default. That was
> a fun one - allowed me to clean up some old DFS code :-).

Excellent. Thanks!

--
Jordan Russell

Akemi Yagi

unread,
Mar 10, 2007, 8:20:05 PM3/10/07
to
On Wed, 07 Feb 2007 14:22:35 -0800, Jeremy Allison wrote:

> On Mon, Feb 05, 2007 at 09:33:35PM -0600, Jordan Russell wrote:
>>
>> In recent versions of Samba (including 3.0.24), attempting to rename a
>> file to a new name that differs only in case appears to have no effect:
>>

>> I'm pretty sure this worked in older versions. Any ideas?
>
> I've just fixed this in SVN. Turns out it was side-effect breakage when we
> turned on root dfs by default. That was a fun one - allowed me to clean up
> some old DFS code :-).
>
> Jeremy.

I noticed the problem and came across this thread after some searching.
Is it correct that the fix will be in 3.0.25 but not in 3.0.24? So, if I
want to correct the problem now, I would need to compile samba from source
with the patched msdfs.c ?

Akemi

Jeremy Allison

unread,
Mar 10, 2007, 8:40:08 PM3/10/07
to
On Sat, Mar 10, 2007 at 05:07:48PM -0800, Akemi Yagi wrote:
> On Wed, 07 Feb 2007 14:22:35 -0800, Jeremy Allison wrote:
>
> > On Mon, Feb 05, 2007 at 09:33:35PM -0600, Jordan Russell wrote:
> >>
> >> In recent versions of Samba (including 3.0.24), attempting to rename a
> >> file to a new name that differs only in case appears to have no effect:
> >>
> >> I'm pretty sure this worked in older versions. Any ideas?
> >
> > I've just fixed this in SVN. Turns out it was side-effect breakage when we
> > turned on root dfs by default. That was a fun one - allowed me to clean up
> > some old DFS code :-).
> >
> > Jeremy.
>
> I noticed the problem and came across this thread after some searching.
> Is it correct that the fix will be in 3.0.25 but not in 3.0.24? So, if I
> want to correct the problem now, I would need to compile samba from source
> with the patched msdfs.c ?

Don't - I'm in the middle of re-writing a lot of
the DFS code for 3.0.25. There's no guarentee that
what is in the tree right now will look anything
like the DFS code in the tree by the end of the
weekend (if my tests go well).

I'll let you know when it's stabilized enough to
pull a fix.

Thanks,

Jeremy.

0 new messages