{"id":9830,"date":"2009-08-14T15:17:00","date_gmt":"1999-11-29T20:00:00","guid":{"rendered":"https:\/\/aidanfinn.com\/?p=9830"},"modified":"2009-08-14T15:17:00","modified_gmt":"1999-11-29T20:00:00","slug":"fix-cannot-share-folder","status":"publish","type":"post","link":"https:\/\/aidanfinn.com\/?p=9830","title":{"rendered":"Fix: Cannot Share Folder"},"content":{"rendered":"<p>I had an issue this week with a Windows Server 2008 machine where we could not share folders.\u00a0 It\u2019s a web server where a new application needs to access data via a share on the same server.\u00a0 Now this was not an issue where people could not connect to a share.\u00a0 This was an issue that when we tried to enable a share the GUI just said \u201cCould not share folder\u201d.\u00a0 NET SHARE on command prompt just said \u201cSystem Error 1 has occurred.\u00a0 Incorrect Function\u201d.<\/p>\n<p>I checked all the usual suspects: Server service, client for file and printer sharing, event logs, Network &amp; Sharing Center, you name it.\u00a0 The strange things was that existing shares were sharing OK.\u00a0 I got MS PSS involved and they pulled loads of logs and traces and couldn\u2019t find anything.\u00a0 Today I got the case escalated to second level support.\u00a0 We ran a ProcMon trace.\u00a0 The Escalation Engineer noticed that the request wasn\u2019t getting down the stack.\u00a0 His first suspect was anti virus.\u00a0 We disabled it but no joy.\u00a0 Next up was Windows Firewall.\u00a0 What?<\/p>\n<p>This is where I started to get sceptical.\u00a0 What the hell would a firewall have to do with enabling a file share?\u00a0 I can see it preventing access to the file share but not creating it.\u00a0 It turns out that there is a rule called \u201cFile and Printer Sharing (Echo Request)\u201d (IPv4 and IPv6 versions) and that must be enabled in order to create a file share.<\/p>\n<p>The firewall on this machine had been customised and that rule was removed.\u00a0 That caused the issue.\u00a0 So how to fix it?\u00a0 The engineer wanted to restore the defaults to the Windows Firewall.\u00a0 But that meant losing everything that was configured in the current firewall rule set.\u00a0 We exported the rules but there\u2019s no way to import\/merge rules.<\/p>\n<p>The engineer got very creative here.\u00a0 He got me to go into \\HKLMSYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyFirewall Rules.\u00a0 We exported that to a .REG file.\u00a0 That\u2019s where every firewall rule is stored.\u00a0 We\u2019d just backed them up to a REG file.\u00a0 We \u201creset defaults\u201d in Windows Firewall and Advanced Security.\u00a0 That restored the firewall back to factory settings.\u00a0 We then imported the .REG file to do a merge.\u00a0 Sweet.\u00a0 We tested and we were able to share folders on the server.<\/p>\n<p>Thanks to Addy in MS PSS for his help in getting this sorted.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had an issue this week with a Windows Server 2008 machine where we could not share folders.\u00a0 It\u2019s a web server where a new application needs to access data via a share on the same server.\u00a0 Now this was not an issue where people could not connect to a share.\u00a0 This was an issue &hellip; <a href=\"https:\/\/aidanfinn.com\/?p=9830\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Fix: Cannot Share Folder&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[52],"tags":[],"class_list":["post-9830","post","type-post","status-publish","format-standard","hentry","category-windows-server"],"aioseo_notices":[],"jetpack_featured_media_url":"","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts\/9830","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9830"}],"version-history":[{"count":0,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts\/9830\/revisions"}],"wp:attachment":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}