Many thanks for your reply. I do not quite understand your question and was going to ask you if you could elaborate it. But I have great news…
WOW, WOW, WOW… I HAVE FOUND THE CULPRIT:
The culprit is macOS Catalina Security Update 2022-004 10.15.7 shown here:
Download Security Update 2022-004 (Catalina)
Download Security Update 2022-004 (Catalina) (UK)
About the security content of Security Update 2022-004 Catalina
About the security content of Security Update 2022-004 Catalina - Apple Support
This is how I have found it:
- Since the issue was driving me nuts, I reinstalled macOS (Command Option R) at booting, which installs the latest version of macOS compatible with your Mac.
- Fortunatelly, it did NOT install the latest macOS version but macOS 10.15.7 (19H15), and File Sharing worked OK. WOW, WOW, WOW!!!
- But Apple - About This Mac - Software Update showed the security update shown above, so I installed it.
- That installed macOS 10.15.7 (19H1922) Catalina, which AGAIN generated the PROBLEM.
Amazing!!! Such macOS 10.15.7 (19H1922) Catalina is the culprit. It breaks File Sharing as described in my first post above. Shocking!!!
BTW, unfortunately, macOS security updates breaking File Sharing is not something new. For instance:
Repair file sharing after Security Update 2017-001 for macOS High Sierra 10.13.1
Repair file sharing after Security Update 2017-001 for macOS High Sierra 10.13.1 - Apple Support
In such a case, it was fixed executing this in Terminal:
sudo /usr/libexec/configureLocalKDC
But in the problem that I have reported above, that does not fix the issue. How to fix it this time?