It
also seems that if user A opens a file,
and
after a while calls trans2setpathinfo or trans2setfileinfo and sets the
DELETE_ON_CLOSE flags,
then
when user B closes that file (user B did NOT open it to delete on close) the
file will be deleted.
-----Original Message-----
From: Nir Livni
Sent: Monday, January 06, 2003 2:49 PM
To: '[EMAIL PROTECTED]'
Subject: delete on close problemsI've noticed that if user A has opened a file with GENERIC_READ ,SHARE_READ | SHARE_DELETE ,FILE_FLAG_DELETE_ON_CLOSEthen user B cannot open the file for reading. samba will return error code : NT_STATUS_DELETE_PENDING, and it is mentioned in the code that -"this is a nasty hack, but necessary until we rewrite our open
handling to use a NTCreateX call as the basic call.
NT may open a file with neither read nor write access, and in
this case it expects the open not to conflict with any
existing deny modes. This happens (for example) during a
"xcopy /o" where the second file descriptor is used for
ACL sets
(tridge)"BUTif user B opens the file for read (and SHARE_READ | SHARE_DELETE) and only then user A opens the file for DELETE_ON_CLOSE,both open requests succeed.1. Is this behaviour normal ?2. Could it be that in scenario similar to scenario B a file will be deleted by the user that hasn't opened it to DELETE_ON_CLOSE ?I'm asking that because I had two users messing up with the same excel file, and it was deleted ...Thanks,Nir
