From: Dennis Clarke on

> Hello,
> Running 3.2.0, and in one of my share, a file named TABAFK~V
> appeared, but is not present on the underlying filesystem.
>
> The file can't be removed from a windows client (even a member of
> domain admins).
>
> Not that it is distrubing, but you know...

You want disturbing ?

On my Samba 3.2.2 server I cd to a directory that is shared out as some
share named "share" :

# pwd
/opt/winshare/test_stuff
# echo "foo" > con
# chown smbtest:samba con
# ls -l con
-rw-r--r-- 1 smbtest samba 4 Sep 4 12:08 con

Back at my 64-bit Windows Vista ( Business Edition ) machine I see :

Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.

C:\Users\dclarke>net view \\FOSSIL
Shared resources at \\FOSSIL

Samba 3.2.2

Share name Type Used as Comment

---------------------------------------------------------
share Disk (UNC) writable share
ultra Disk external seagate
The command completed successfully.


Is the Samba server running fine and doing what it should?
Yes it is :

# /opt/csw/bin/smbstatus

Samba version 3.2.2
PID Username Group Machine
-------------------------------------------------------------------
15585 smbtest samba ultra20 (192.168.35.4)

Service pid machine Connected at
-------------------------------------------------------
share 15585 ultra20 Wed Sep 3 22:40:41 2008
ultra 15585 ultra20 Wed Sep 3 23:19:10 2008
IPC$ 15585 ultra20 Wed Sep 3 22:40:41 2008

Locked files:
Pid Uid DenyMode Access R/W Oplock
Share
Path Name Time
----------------------------------------------------------------
15585 12345 DENY_NONE 0x100001 RDONLY NONE
/export/smbd/ultra20 . Wed Sep 3 23:21:47 2008
15585 12345 DENY_ALL 0x6019f RDWR EXCLUSIVE+BATCH
/export/smbd/ultra20 VMware/s10u5/mercury/Solaris 10 64-bit-f007.vmdk
Thu Sep 4 12:06:26 2008

So let's take a look at that new file called "con" on that share :

C:\Users\dclarke>dir \\FOSSIL\share\test_stuff\
Volume in drive \\FOSSIL\share is share
Volume Serial Number is 09FC-04E7

Directory of \\FOSSIL\share\test_stuff

09/04/2008 12:08 PM <DIR> .
09/03/2008 10:18 PM <DIR> ..
12/30/2007 08:15 PM 19 text.txt
11/18/2007 07:32 PM 2,970,312 817-5093.pdf
12/03/2007 01:58 PM 3,342,666 Sun Studio 11 C Users Guide
819-3688-10.pdf
11/25/2007 11:43 PM 2,099,796 Sun Studio 12 C Users Guide
819-5265.pdf
12/17/2007 11:01 PM 3,380,801 Sun Studio 8 C User's Guide
817-5064.pdf
08/25/2008 05:49 PM <DIR> select
09/03/2008 10:56 PM 146,093 samba_322_sparc20_sol8.jpg
09/04/2008 12:08 PM 4 CSHOFG~F
7 File(s) 11,939,691 bytes
3 Dir(s) 109,947,904 bytes free


See a funny looking file ( CSHOFG~F ) there ? It sure is not named "con"
now is it? How did the name change? Did the name change ?

Let's go look at the Samba server :

# pwd
/opt/winshare/test_stuff
# ls -l
total 23452
-rwxr--r-- 1 smbtest samba 2970312 Nov 18 2007 817-5093.pdf
-rwxr--r-- 1 smbtest samba 3342666 Dec 3 2007 Sun Studio 11 C
Users Guide 819-3688-10.pdf
-rwxr--r-- 1 smbtest samba 2099796 Nov 25 2007 Sun Studio 12 C
Users Guide 819-5265.pdf
-rwxr--r-- 1 smbtest samba 3380801 Dec 17 2007 Sun Studio 8 C
User's Guide 817-5064.pdf
-rw-r--r-- 1 smbtest samba 4 Sep 4 12:08 con
-rwxr-xr-x 1 smbtest samba 146093 Sep 3 22:56
samba_322_sparc20_sol8.jpg
drwxr-xr-x 2 smbtest samba 3584 Aug 25 17:49 select
-rw-r--r-- 1 smbtest samba 19 Dec 30 2007 text.txt

Well golly gee .. the file named "con" is still there on the Samba server
and it looks fine but Vista can not see it and will not deal with it.

Must be a bug in Samba ?

Not bloody likely.

You should look on your Samba server to see if there are funny looking
three letter files named "con" or "com" or such.

Dennis

--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba
From: Dennis Clarke on
>> You should look on your Samba server to see if there are funny looking
>> three letter files named "con" or "com" or such.
>
> con is a DOS reserved name. That's why Samba mangles it.

right .. I knew that but you missed the point.

The point, to be pedantic and clear here, is that Microsoft *should* be
well past the days of that DOS restriction.

Where in the samba code is this mangle done? Perhaps it is a worthwhile
experiment to not mangle it.

Dennis


--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba
From: Jeremy Allison on
On Thu, Sep 04, 2008 at 12:26:05PM -0400, Dennis Clarke wrote:
>
> You want disturbing ?
>
> On my Samba 3.2.2 server I cd to a directory that is shared out as some
> share named "share" :
>
> # pwd
> /opt/winshare/test_stuff
> # echo "foo" > con
> # chown smbtest:samba con
> # ls -l con
> -rw-r--r-- 1 smbtest samba 4 Sep 4 12:08 con
>
> Back at my 64-bit Windows Vista ( Business Edition ) machine I see :
>
> Microsoft Windows [Version 6.0.6000]
> Copyright (c) 2006 Microsoft Corporation. All rights reserved.
>
> C:\Users\dclarke>net view \\FOSSIL
> Shared resources at \\FOSSIL
>
> Samba 3.2.2
>
> Share name Type Used as Comment
>
> ---------------------------------------------------------
> share Disk (UNC) writable share
> ultra Disk external seagate
> The command completed successfully.
>
>
> Is the Samba server running fine and doing what it should?
> Yes it is :
>
> # /opt/csw/bin/smbstatus
>
> Samba version 3.2.2
> PID Username Group Machine
> -------------------------------------------------------------------
> 15585 smbtest samba ultra20 (192.168.35.4)
>
> Service pid machine Connected at
> -------------------------------------------------------
> share 15585 ultra20 Wed Sep 3 22:40:41 2008
> ultra 15585 ultra20 Wed Sep 3 23:19:10 2008
> IPC$ 15585 ultra20 Wed Sep 3 22:40:41 2008
>
> Locked files:
> Pid Uid DenyMode Access R/W Oplock
> Share
> Path Name Time
> ----------------------------------------------------------------
> 15585 12345 DENY_NONE 0x100001 RDONLY NONE
> /export/smbd/ultra20 . Wed Sep 3 23:21:47 2008
> 15585 12345 DENY_ALL 0x6019f RDWR EXCLUSIVE+BATCH
> /export/smbd/ultra20 VMware/s10u5/mercury/Solaris 10 64-bit-f007.vmdk
> Thu Sep 4 12:06:26 2008
>
> So let's take a look at that new file called "con" on that share :
>
> C:\Users\dclarke>dir \\FOSSIL\share\test_stuff\
> Volume in drive \\FOSSIL\share is share
> Volume Serial Number is 09FC-04E7
>
> Directory of \\FOSSIL\share\test_stuff
>
> 09/04/2008 12:08 PM <DIR> .
> 09/03/2008 10:18 PM <DIR> ..
> 12/30/2007 08:15 PM 19 text.txt
> 11/18/2007 07:32 PM 2,970,312 817-5093.pdf
> 12/03/2007 01:58 PM 3,342,666 Sun Studio 11 C Users Guide
> 819-3688-10.pdf
> 11/25/2007 11:43 PM 2,099,796 Sun Studio 12 C Users Guide
> 819-5265.pdf
> 12/17/2007 11:01 PM 3,380,801 Sun Studio 8 C User's Guide
> 817-5064.pdf
> 08/25/2008 05:49 PM <DIR> select
> 09/03/2008 10:56 PM 146,093 samba_322_sparc20_sol8.jpg
> 09/04/2008 12:08 PM 4 CSHOFG~F
> 7 File(s) 11,939,691 bytes
> 3 Dir(s) 109,947,904 bytes free
>
>
> See a funny looking file ( CSHOFG~F ) there ? It sure is not named "con"
> now is it? How did the name change? Did the name change ?
>
> Let's go look at the Samba server :
>
> # pwd
> /opt/winshare/test_stuff
> # ls -l
> total 23452
> -rwxr--r-- 1 smbtest samba 2970312 Nov 18 2007 817-5093.pdf
> -rwxr--r-- 1 smbtest samba 3342666 Dec 3 2007 Sun Studio 11 C
> Users Guide 819-3688-10.pdf
> -rwxr--r-- 1 smbtest samba 2099796 Nov 25 2007 Sun Studio 12 C
> Users Guide 819-5265.pdf
> -rwxr--r-- 1 smbtest samba 3380801 Dec 17 2007 Sun Studio 8 C
> User's Guide 817-5064.pdf
> -rw-r--r-- 1 smbtest samba 4 Sep 4 12:08 con
> -rwxr-xr-x 1 smbtest samba 146093 Sep 3 22:56
> samba_322_sparc20_sol8.jpg
> drwxr-xr-x 2 smbtest samba 3584 Aug 25 17:49 select
> -rw-r--r-- 1 smbtest samba 19 Dec 30 2007 text.txt
>
> Well golly gee .. the file named "con" is still there on the Samba server
> and it looks fine but Vista can not see it and will not deal with it.
>
> Must be a bug in Samba ?
>
> Not bloody likely.
>
> You should look on your Samba server to see if there are funny looking
> three letter files named "con" or "com" or such.

con is a DOS reserved name. That's why Samba mangles it.

Jeremy.
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba
From: John Drescher on
On Thu, Sep 4, 2008 at 12:55 PM, Dennis Clarke <dclarke(a)blastwave.org> wrote:
>>> You should look on your Samba server to see if there are funny looking
>>> three letter files named "con" or "com" or such.
>>
>> con is a DOS reserved name. That's why Samba mangles it.
>
> right .. I knew that but you missed the point.
>
> The point, to be pedantic and clear here, is that Microsoft *should* be
> well past the days of that DOS restriction.
>
It is not. I guess they do not want to cut off some backward
compatibility. I mean try to create a directory named CON in windows
XP. I just did and it called it New Folder instead of CON.

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

> On Thu, Sep 4, 2008 at 12:55 PM, Dennis Clarke <dclarke(a)blastwave.org>
> wrote:
>>>> You should look on your Samba server to see if there are funny looking
>>>> three letter files named "con" or "com" or such.
>>>
>>> con is a DOS reserved name. That's why Samba mangles it.
>>
>> right .. I knew that but you missed the point.
>>
>> The point, to be pedantic and clear here, is that Microsoft *should* be
>> well past the days of that DOS restriction.
>>
> It is not. I guess they do not want to cut off some backward
> compatibility. I mean try to create a directory named CON in windows
> XP. I just did and it called it New Folder instead of CON.

Seems insane. On the one hand Microsoft is notorious for breaking
compatibility in things like MS-Word but drags around this DOS console
thing from 1984. Maybe even earlier.

Personally I see it as a bug in Microsoft DOS 6.22 that never went away.

Dennis


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