0

I have a SMB share (Microsoft DFS) mounted to a linux host. On the linux host I am running a Java program that reads header data from files on the SMB share. The program uses FileInputStream to read the file and does not explicitly place a lock on the file before reading it. Is it possible that DFS would be placing a lock on the file even if my program does not request it?

  • What do you mean locking the file? Once you opened the file there is a "open" object on the file and till the connection is closed or you "close" the object the file could not be deleted. In SMB there is an internal lock called lease or batch, depend on the WIN OS version – Eliad Cohen Nov 18 '18 at 20:03
  • Thanks Eliad. To clarify I would like to know if a read lock could be opened on the file by DFS. If you're saying there is a lock preventing deletion of the file but not preventing concurrent reads then I have what I need. – Michael Sebetich Nov 19 '18 at 19:49
  • The open rules is not very simple nevertheless the lock does not prevent for future read. – Eliad Cohen Nov 20 '18 at 20:11

0 Answers0