I've noticed that if
user A has opened a file with GENERIC_READ ,
SHARE_READ | SHARE_DELETE ,
FILE_FLAG_DELETE_ON_CLOSE
then 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)"
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)"
BUT
if 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
