On Thu, Nov 02, 2000 at 01:11:25PM +0000, Georg Mischler wrote:
> Hi all,
>> just to report some strange problem I have encountered,
> even if it probably isn't caused by Python or the Win32
> extensions:
>> When accessing files on a Linux server running Samba from
> a Windows2000 client, the function win32file.CreateFile()
> is very likely to raise a "Permission denied" exception.
> This happens even if the actual permissions are all fine
> for creating that file and is most likely the consequence
> of an incompatibility between Windows2000 and Samba.
>> The workaround is to open the file by other means:
>> myFile = open('myfile.txt', 'w')
> myHandle = win32file._get_osfhandle(myFile.fileno())
>> Note that if you want to append to an existing file,
> you'll have to explicitly move the file pointer to
> the end of the file before writing, even if you
> specified mode 'a' in the open:
>> win32file.SetFilePointer(myHandle, 0,
> win32file.FILE_END)
>>> I'm not sure if anything else can be done, eg. by tweaking
> some Samba configuration parameters, or by fiddling with
> the arguments of CreateFile(), neither of which I am
> extremely familiar with. The purpose of this post is
> more to point to the problem and one possible workaround.
>> Of course, if the win32 experts should find a solution
> directly within that module, more power to them!
Interesting... I'm not sure if it's related but I'm having
other non-Python problems with Win2K and Samba.
I have a network drive mapped to a directory on a linux box
running Samba and when booting up the Win2K box it _always_
says it can't find the network drive, but if I go into
Windows Explorer or something and try and open that network
drive it works perfectly and everything after that can
access it fine.
So it looks like some of the ways Win2K tries to login to Samba
don't work, but others do...
Evan Gibson.
> Have fun!
> -schorsch
> --
> Georg Mischler -- simulations developer -- schorsch at schorsch.com
> +schorsch.com+ -- lighting design tools -- http://www.schorsch.com/
--
Evan ~ThunderFoot~ Gibson ~ nihil mutatem, omni delendum ~
Walking on water... over pavement;
Treading on miracles ground into everyday dust.