Again, please help: cannot copy a file (SMBnttrans/SMBntcreateX)

Jörg Leinhoß leinhoss at AED-Graphics.de
Thu Aug 30 09:01:16 GMT 2001


Hi,

I post this message again because we have massive problems copying files to a samba share. The described scene - copy two file a or
b - is only a simplified exapmple! I upgrade the linux kernel to 2.4.9 (samba is 2.2.1a) and the problem remains. Please help!!!

The captured logs (log.smbd log level 5):
try to copy file "a" (don't work): http://www.aed-graphics.de/a.log.smbd.txt (below line 67)
copying file "b" (works): http://www.aed-graphics.de/b.log.smbd.txt (below line 77)

Thanks and Regards,
J.Leinhoss

----

Jörg Leinhoß wrote:
> 
> Hi,
> 
> we have the problem, that we cannot copy a file to a samba share while the same file (equal exept filename and timestamp) we can
> copy without problem. The share is in use over several month without problems and we use samba over several years and plattforms.
> When we try to copy the file (with the windows explorer) a error box "Cannot copy file. File exists." pops up. In the moment of the
> copy a 0 byte long file with the same filename is created in the target dir, which cannot overwritten. The file remains as a normale
> 0 byte file after cancel the copy process.
> After the problem occurs (while try to copy the file to the share) then we rename the file, change the permissions or dos
> attributes, copying with the windows explorer lokaly - we cannot copy the file into the share anywhere! When we copy the file to
> another share and back, then we can copy the file. A nearly equal file (contents, permissions, timestamps, dos attributes) can also
> be copied!
> 
> I switch the smbd to log level 5 and capture the log while try to copy the file (filename a) without success and copy an equal file
> (filename b) with success.
> While try to copying file "a" it comes to a SMBnttrans. While copying the file "b" it comes to SMBntcreateX. What means this? Why?
> 
> Thanks and Regards,
> Joerg Leinhoss
> 
> Environment: NT4SP5, Linux 2.2.10, Samba 2.2.1a (default configure swichtes)
> 
> ############## partital log.smbd while try to copy a file "a" (no success)
> ...
> [2001/08/27 18:01:35, 3] smbd/process.c:switch_message(650)
>   switch message SMBnttrans (pid 1745)
> [2001/08/27 18:01:35, 4] smbd/uid.c:become_user(119)
>   Skipping become_user - already user
> [2001/08/27 18:01:35, 5] smbd/nttrans.c:call_nt_transact_create(1218)
>   call_nt_transact_create
> [2001/08/27 18:01:35, 5] smbd/filename.c:unix_convert(146)
>   unix_convert called on file "\a"
> [2001/08/27 18:01:35, 3] lib/util.c:unix_clean_name(403)
>   unix_clean_name [/a]
> [2001/08/27 18:01:35, 5] smbd/filename.c:unix_convert(222)
>   unix_convert begin: name = a, dirpath = , start = a
> [2001/08/27 18:01:35, 3] smbd/dosmode.c:unix_mode(113)
>   unix_mode(a) returning 0744
> [2001/08/27 18:01:35, 5] smbd/files.c:file_new(107)
>   allocated file structure 6350, fnum = 10446 (1 used)
> [2001/08/27 18:01:35, 3] lib/util.c:unix_clean_name(403)
>   unix_clean_name [a]
> [2001/08/27 18:01:35, 4] smbd/open.c:open_file_shared(740)
>   calling open_file with flags=0x1 flags2=0xC0 mode=0744
> [2001/08/27 18:01:35, 2] smbd/open.c:open_file(216)
>   leinhoss opened file a read=No write=Yes (numopen=1)
> [2001/08/27 18:01:35, 5] smbd/oplock.c:set_file_oplock(170)
>   set_file_oplock: granted oplock on file a, dev = 309, inode = 2045, tv_sec = 3b8a6edf, tv_usec = 7dc96
> [2001/08/27 18:01:35, 2] smbd/close.c:close_normal_file(205)
>   leinhoss closed file a (numopen=0)
> [2001/08/27 18:01:35, 5] smbd/files.c:file_free(306)
>   freed files structure 10446 (0 used)
> [2001/08/27 18:01:35, 3] smbd/error.c:error_packet(123)
>   error string = Operation not permitted
> [2001/08/27 18:01:35, 3] smbd/error.c:error_packet(141)
>   error packet at line 1469 cmd=160 (SMBnttrans) eclass=1 ecode=12
> ...
> 
> ############## partital log.smbd while try to copy an equal file "b" (success)
> ...
> [2001/08/27 18:02:42, 3] smbd/process.c:switch_message(650)
>   switch message SMBntcreateX (pid 1745)
> [2001/08/27 18:02:42, 4] smbd/uid.c:become_user(119)
>   Skipping become_user - already user
> [2001/08/27 18:02:42, 5] smbd/filename.c:unix_convert(146)
>   unix_convert called on file "\b"
> [2001/08/27 18:02:42, 3] lib/util.c:unix_clean_name(403)
>   unix_clean_name [/b]
> [2001/08/27 18:02:42, 5] smbd/filename.c:unix_convert(222)
>   unix_convert begin: name = b, dirpath = , start = b
> [2001/08/27 18:02:42, 3] smbd/dosmode.c:unix_mode(113)
>   unix_mode(b) returning 0744
> [2001/08/27 18:02:42, 5] smbd/files.c:file_new(107)
>   allocated file structure 6353, fnum = 10449 (2 used)
> [2001/08/27 18:02:42, 3] lib/util.c:unix_clean_name(403)
>   unix_clean_name [b]
> [2001/08/27 18:02:42, 4] smbd/open.c:open_file_shared(740)
>   calling open_file with flags=0x1 flags2=0xC0 mode=0744
> [2001/08/27 18:02:42, 2] smbd/open.c:open_file(216)
>   leinhoss opened file b read=No write=Yes (numopen=2)
> [2001/08/27 18:02:42, 5] smbd/oplock.c:set_file_oplock(170)
>   set_file_oplock: granted oplock on file b, dev = 309, inode = 2047, tv_sec = 3b8a6f22, tv_usec = ea6c3
> [2001/08/27 18:02:42, 5] smbd/nttrans.c:reply_ntcreate_and_X(1025)
>   reply_ntcreate_and_X: fnum = 10449, open name = b
> [2001/08/27 18:02:42, 5] lib/util.c:show_msg(292)
> ...
> 
> #eof




More information about the samba-technical mailing list