File disappears after copy from Mac OS X to Samba 2.2.7

Ed Holden eholden at
Wed Nov 19 19:04:19 GMT 2003

Someone on the regular Samba list suggested that I contact Conrad 
Minshall, so I joined this list.  I'm having a problem when copying 
files from Mac OS X (10.2) to a PPC Linux server running Samba 2.2.7.  I 
can replicate this intermittent problem on an Intel Samba server as 
well, so it's not distro-specific.

The problem is this: some files disappear after a copy from OS X to 
Samba is complete.  A command-line analysis (i.e., typing "ls -l" 
repeatedly) shows that the file really exists and fills up with data 
during the copy, but then it vanishes.

The Mac does some unusual things when it tries to write the file, 
including creating a .DS_Store file, as well as a temporary version of 
the target file beginning with the ._ string.  Still, nothing really 
suspicious.  I suspect that this is an issue with Mac OS X dropping the 
file prematurely, and indeed a Google search reveals that OS X users 
have seen similar problems, but only with Samba shares.  Also, it 
doesn't happen to all files.

I did a level 10 debug on the Samba server and was able to find what I 
think are the last few lines that deal with the upload of a file called 
"gnu-linux.pdf", which I copied to the folder "\NRL Databases" and which 
immediately disappeared.  A snippet is included below, but there are a 
LOT of lines containing opening and closing that file during its copy. 
Does anyone know what I should be looking for in this log, or how to 
correct the problem?

Thanks in advance,

eholden at wrote:

 > [2003/11/12 11:11:44, 2] smbd/open.c:open_file(245)
 >   NRLADMIN opened file NRL Databases/gnu-linux.pdf read=Yes write=No
 > (numopen=1)
 > [2003/11/12 11:11:44, 10] smbd/open.c:open_file_shared1(1042)
 >   open_file_shared : share_mode = 10
 > [2003/11/12 11:11:44, 10] locking/locking.c:set_share_mode(692)
 >   set_share_mode: creating entry for file NRL Databases/gnu-linux.pdf.
 > num_share_modes = 1
 > [2003/11/12 11:11:44, 10] locking/locking.c:print_share_mode_table(445)
 >   print_share_mode_table: share_mode_entry[0]: pid = 1838, share_mode =
 > 0x10, desired_access = 0x10000, port = 0x0, type= 0x0, file_id = 27, dev
 > = 0x801, inode = 65538
 > [2003/11/12 11:11:44, 10] locking/locking.c:del_share_entry(604)
 >   del_share_entry: num_share_modes = 1
 > [2003/11/12 11:11:44, 10] locking/locking.c:del_share_entry(609)
 >   del_share_entry: deleted share_mode_entry[0]: pid = 1838, share_mode =
 > 0x10, desired_access = 0x10000, port = 0x0, type= 0x0, file_id = 27, dev
 > = 0x801, inode = 65538
 > [2003/11/12 11:11:44, 10] locking/locking.c:del_share_entry(617)
 >   del_share_entry: deleting entry 0
 > [2003/11/12 11:11:44, 10] locking/locking.c:del_share_entry(639)
 >   del_share_entry: Remaining table.
 > [2003/11/12 11:11:44, 10] smbd/close.c:close_normal_file(153)
 >   close_normal_file: share_entry_count = 0 for file NRL
 > Databases/gnu-linux.pdf
 > [2003/11/12 11:11:44, 10] locking/posix.c:posix_locking_close_file(1245)
 >   posix_locking_close_file: file NRL Databases/gnu-linux.pdf has no
 > outstanding locks.
 > [2003/11/12 11:11:44, 2] smbd/close.c:close_normal_file(213)
 >   nrladmin closed file NRL Databases/gnu-linux.pdf (numopen=0)

Any information, including protected health information (PHI), transmitted
in this email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential and or
exempt from disclosure under applicable Federal or State law. Any review,
retransmission, dissemination or other use of or taking of any action in
reliance upon, protected health information (PHI) by persons or entities other
than the intended recipient is prohibited. If you received this email in error,
please contact the sender and delete the material from any computer.

More information about the samba-technical mailing list