

Smbd 2492 root cwd DIR 8,9 4096 2 /bkp/local The only situation which I found that open files are visible via lsof or smbstatus -L, is when you have open files from Microsoft Office 2010 onward. Is there anyone that could possibly know any tools that could list open/locked files from Samba shared folders, since that smbstatus -L doesn't seem to be an option for this problem?Īccording to my findings, thanks to VFS Modules, Samba does not keep File Descriptors for the files which are being shared and used, no matter what kind of normal file it is, with just one exception. Using VFS Modules for auditing operations for any file inside the shared folder could be a source for a Shellscript, but that its not practical. , and so on, and make a if then in order to define if a Microsoft Office file is opened or not, but this of workaround, is not what I'm looking for. With a Shellscript, list all files with extensions like. There are some other options to track open files like: It just show the sPID which is using the shared folder on the local filesytem of the server. Smbd 1432 root cwd DIR 8,9 4096 2 /backup/localĪlso using fuser, it doesn't give any information about open files or locked files. Using lsof, it only gives me the information about what process is using the shared on folder, on the local filesytem of the server. Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED When running smbstatus -L, it doesn't point any information about any open files or locked files. Until now, I just have one shared folder configured for the entire network and I would like to watch if there are open files on this share. Sorry that the inbox classes won't work for your scenario :(.I have a Filer Server running Debian Jessie 8.7 on my network, with Samba 4.2.14. This means that you'll have to implement your own polling-based watcher for network-based shares :(. Otherwise, it's all dependent on the sharing protocol to support forwarding change notifications and, currently, Samba does not support (to my knowledge, at least). OS X has much less documentation around this, but anything I found (nothing first-party) specified the same thing this isn't natively supported.Īll of this means that, unfortunately, the built-in FileSystemWatcher classes will work for local changes OR (potentially) remove NTFS shares since I believe NTFS forwards change notifications. On Linux distros that use inotify, getting change notifications from network-based shares is explicitly not supported via the man page.

It does support FindFirstChangeNotification for determining when something (generically) has changed, though. For Windows, we use the ReadDirector圜hangesW API RDCW cannot watch for changes on remote machines without proper server support but I do not believe Samba supports this today. Unfortunately, watching for file changes on network shares is highly dependent on the server platform as well as the client platform.
