NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

BtrieveBill's avatar
BtrieveBill
Aspirant
Aug 09, 2021
Solved

How do I reset a Windows File Sharing Session to close open files?

Like most of you, I assume, I use a ReadyNAS 516 to store a ton of data.  In my case, this also includes my users' Email profiles, which allows them to acecss their Email from any computer on the LAN...
  • StephenB's avatar
    Aug 10, 2021

    BtrieveBill wrote:

     

    So, my question is simply this: How can I close all open files from a single, presumed-dead, connection, without closing ALL open files for all other users?


    You should be able to do it using ssh.

     

    smbstatus will give you the list of locked files at the end of the status info.  Each entry starts with the process ID (pid) that has that file open.  You find the file you want to forcibly close, and then kill the corresponding pid using kill.  Killing the process will close all files opened by that pid.

     

    You can reduce the amount of output using smbstatus | grep -i xxxx  - in your case, using the profile name (or a reasonably long part of it).

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More