Recently I was sharing out a log file directory on a Windows server. When I went to create the file, I received the following message:
“An error occurred while trying to share log$. Incorrect function. The shared resource was not created at this time”.
Great – why would this be? You know who knew? Google. (To be fair, I did look in the Event Log and did not see any relevant entries – though I could have missed it… I didn’t look all that hard).
Anyway, so turns out this usually means there is some corruption in the firewall rules. That makes perfect sense because this server had had some host-based firewall management software installed at one point which died an unexplained death. That software was removed but apparently left scars on the system.
So, the fix is to reset the firewall config (true, there may be more elegant ways to do it, but this is certainly fast and seems reliable). So anyway, I went into the Firewall and Advanced Security section of windows and simply said “Restore Default Policy”. (NB: If you’re connected via RDP – this will almost certainly break your connection, and it may require console access to restore your rules. If they are set by GPO then maybe a reboot but either way, you’ll probably be disconnected and may have a hard time reconnecting. Plan for that).
After being disconnected, connecting to the HyperV console and fixing the firewall configuration, I was able to create the share successfully.