So I have a Kali Linux 2019.4 box on which I run a monthly script that mounts 4 CIFS shares from which I go grab a couple of files. That script has always ran well without any issue, but since upgrading to 2019.4 around 1-2 weeks ago, when I run the script, I'm getting the following error for files inside the 1st CIFS mounted share:
OSError: [Errno 116] Stale file handle: $FILE_I_WANT_TO_COPY
No matter how I try to interact with the files inside that share, nothing works, I always get the "Stale file handle" error. The only thing I can do is list the directories (ls). The other CIFS shares do not have that issue, and I'm able to copy files from them to my Kali Linux box without any issue. Also, I'm able to interact (copy, move, etc.) these files from that share if I'm under a Windows system (Windows 10 v2004 (Insider Preview)).
Things I tried (to no avail) to solve the issue:
- Unmount/mount the share
- Reboot the system
- Change the vers option in the mount command to 2.1 and 3.0
- Change the cache option in the mount command to none
- apt-update && apt-upgrade
I'll continue exploring the various possible solutions I come across on the web in the meantime, but if you have any idea of what's happening and what the solution is, I would appreciate it.
Thank you.