[Samba] File Disappearance after copy from OS X

Ed Holden eholden at mclean.harvard.edu
Tue Nov 18 16:45:38 GMT 2003


Hi,

I wrote in last week about a problem with Mac OS X systems copying files 
to a Samba server.  The files sometimes disappear, though the problem is 
intermittent.  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.

Has anyone else run into this?  If so, were you able to correct it?  I 
did a level 10 debug on the Samba (2.x, Linux) server and was able to 
find what I think are the last few that deal with the upload of a file 
called gnu-linux.pdf, which I copied to the folder "\NRL Databases" and 
which immediately disappeared.  That bit 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,
Ed

eholden at mclean.harvard.edu wrote:

> I think that the Mac might do 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.
 > There are a lot of instances of filename mangling, opening the file,
> closing the file and so forth, spanning many lines, so I didn't
 > include it all.  But this is, I think, the very end.
> 
> [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)
> 
>>
>>eholden at mclean.harvard.edu wrote:
 >>|
>>| Hi.  I'm converting a group that was using Mac OS
>>| X Server (we were dissatisfied) to Mandrake PPC
>>| Linux with Samba.  The Mandrake-supplied package is
>>| version 2.2.7a-8mdk.  So far it works great - but
>>| we have a serious and odd problem that I couldn't
>>| find in previous postings to this list.
>>|
>>| When I copy files from an OS X server to this
>>| Mandrake/Samba server they usually disappear.  Which is
>>| bad, from a service point of view.  I can often copy a
>>| single file to the share and it works fine, but subsequent
>>| files vanish.
>>
>>I would suggest getting a network trace and looking
>>for any SMBunlink commands showung up.  You could get
>>a samba level 10 debug log and do the same thing.  My
>>guess is that the mac server is deleting the file
>>and Samba is just doing what it was told to do.
>>
>>
>>
>>
>>
>>cheers, jerry
>>- --
>>~ ----------------------------------------------------------------------
>>~ Hewlett-Packard            ------------------------- http://www.hp.com
>>~ SAMBA Team                 ---------------------- http://www.samba.org
>>~ GnuPG Key                  ---- http://www.plainjoe.org/gpg_public.asc
>>~ "If we're adding to the noise, turn off this song" --Switchfoot (2003)




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 mailing list