[Samba] Non running DOS programs from path with long names
Peter Barker
pbarker at display.co.uk
Thu Aug 8 12:46:02 GMT 2002
Greetings List
I have a redhat 7.3/Samba 2.2.3a file server (NOT PDC) on a linux/windows
network. Everything seemed to work well in Win32 land until we noticed this
interesting feature.
We have stored a DOS program ("DOSPROG.EXE") in a local public Samba share,
777 directory and file permissions. So all open and highly unsecure. We
want to run the program from a Win98 client. To do this we map a network
share to a drive letter in Windows, eg"L:". Then we open a dos box in the
windows client. At the dos command prompt we type "L:" to change to the
mapped share and use "CD" to change to the required directory where
DOSPROG.EXE is stored. So far so good. So now, if we type "DOSPROG" at the
command prompt in the WIn98 client we expect to see the program start.
What happens next seems to depend on the nature of the directory path name
on that share. From some experimentation and simple tests I have deduced
that if the path is a normal DOS compliant path name then the program will
start as expected. But if the path name has "long name" elements (not DOS
8.3 convention, eg "\a long path name\test") then the program fails to
start and the message "Access denied" is returned to the Win98 client. This
seems to be true even if I make the DOS current directory the same as the
directory in which DOSPROG is located (so I don't need to type any path
name to start the program). The DOS program is, of course, "8.3" DOS name
compliant.
As an experiment, I have made a simple symlink to the long file name path,
ie "\simple -> \a long path name\test" and when I "cd \simple" I can run
the dos program. If I "cd \a long path name\test" I cannot run the DOSPROG
program. When the same experiment is repeated with a WinNT host instead of
linux Samba host - then the DOSPROG will run form where ever it is, long
path names or not.
This is possibly something to do with name mangling? Is this a known
feature or has anyone else seen this type of behaviour with DOS programs
running from a Samba file share? Any comments greatly welcomed - especially
if they help me run the program from that pesky share without a sym link).
More information about the samba
mailing list