{"id":137,"date":"2014-06-13T16:06:38","date_gmt":"2014-06-13T16:06:38","guid":{"rendered":"http:\/\/www.torontohelpdesk.ca\/blog\/?p=137"},"modified":"2014-06-13T16:08:01","modified_gmt":"2014-06-13T16:08:01","slug":"getting-access-denied-error-5-when-using-robocopy","status":"publish","type":"post","link":"https:\/\/www.torontohelpdesk.ca\/blog\/getting-access-denied-error-5-when-using-robocopy\/","title":{"rendered":"Getting Access Denied Error 5 When Using Robocopy"},"content":{"rendered":"<p><strong>Problem:<\/strong><\/p>\n<p>Getting access denied error 5 when using Robocopy<\/p>\n<p><strong>Solution:<\/strong><\/p>\n<p>(h\/t Al, see KB979808 <a href=\"http:\/\/support.microsoft.com\/kb\/979808\">http:\/\/support.microsoft.com\/kb\/979808<\/a>)<br \/>\n(Quick hot fix download: <a href=\"http:\/\/www.torontohelpdesk.ca\/blog\/wp-content\/uploads\/2014\/06\/406633_intl_x64_zip.rar\">406633_intl_x64_zip<\/a>)<\/p>\n<div id=\"MT0\" class=\"sbody\" style=\"margin-left: 40px;\">Consider the following scenario:<\/p>\n<ul>\n<li>You add a user account to the domain Backup Operators group or to the local Backup Operators group.<\/li>\n<li>You use this account to log on to a computer that is running Windows 7 or Windows Server 2008 R2.<\/li>\n<li>You use the <b>Robocopy<\/b> command together with the <b>\/B<\/b> option to copy some files that you do not have access permissions or ownership.<\/li>\n<\/ul>\n<p>In this scenario, these files are copied successfully. However, their security configuration information such as an access control list (ACL) is not copied. Instead, these files inherit their ACL from the destination folder.<\/p>\n<p>Additionally, the <b>Robocopy.exe<\/b> utility returns one of the following error messages:<\/p>\n<ul>\n<li>\n<div class=\"kb_errormsgbody\">\n<div class=\"kb_errorcontent\">\n<div class=\"errormsg\">ERROR 5 (0x00000005) Copying NTFS Security to Destination Directory <var>&lt;directory name&gt;<\/var> Access is denied<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li>\n<div class=\"kb_errormsgbody\">\n<div class=\"kb_errorcontent\">\n<div class=\"errormsg\">ERROR 5 (0x00000005) Copying NTFS Security to Destination File<var>&lt;directory name&gt;<\/var> Access is denied<\/div>\n<\/div>\n<\/div>\n<\/li>\n<\/ul>\n<p><b> Note<\/b> When a member of the Backup Operators group runs the <b>Robocopy.exe<\/b> utility together with the <b>\/B<\/b> option to copy a file, everything should be copied. The member should have access to the file security configuration information even if the member does not have permissions to the file or ownership of the file.<\/p>\n<div class=\"topOfPage\"><a href=\"http:\/\/support.microsoft.com\/kb\/979808\/en-us#top\"><img decoding=\"async\" src=\"http:\/\/support.microsoft.com\/library\/images\/support\/en-us\/uparrow.gif\" alt=\"\" \/>Back to the top<\/a> | <a href=\"http:\/\/support.microsoft.com\/kb\/979808\/en-us#survey\">Give Feedback<\/a><\/div>\n<\/div>\n<h2 id=\"tocHeadRef\" class=\"subTitle\"><img decoding=\"async\" class=\"kb_tabs_toggle kb_tabs_toggle_open\" src=\"http:\/\/support.microsoft.com\/library\/images\/support\/en-us\/20x20_grey_minus.png\" alt=\"Collapse image\" \/><a>CAUSE<\/a><\/h2>\n<div id=\"MT1\" class=\"sbody\" style=\"margin-left: 40px;\">This issue occurs because the <b>Robocopy.exe<\/b> utility does not open these files by using the &#8220;backup intent&#8221; flag when the <b>\/B<\/b> option is used. This behavior prevents access to the security configuration information for a user who has the &#8220;Back up files and directories&#8221; (SE_BACKUP_PRIVILEGE) privilege.<b>Note<\/b> If a file is opened by using the &#8220;backup intent&#8221; flag, certain access rights are checked, and then the user who opened the file is granted the appropriate access to the file.<\/p>\n<div class=\"topOfPage\"><a href=\"http:\/\/support.microsoft.com\/kb\/979808\/en-us#top\"><img decoding=\"async\" src=\"http:\/\/support.microsoft.com\/library\/images\/support\/en-us\/uparrow.gif\" alt=\"\" \/>Back to the top<\/a> | <a href=\"http:\/\/support.microsoft.com\/kb\/979808\/en-us#survey\">Give Feedback<\/a><\/div>\n<\/div>\n<h2 id=\"tocHeadRef\" class=\"subTitle\"><img decoding=\"async\" class=\"kb_tabs_toggle kb_tabs_toggle_open\" src=\"http:\/\/support.microsoft.com\/library\/images\/support\/en-us\/20x20_grey_minus.png\" alt=\"Collapse image\" \/><a>RESOLUTION<\/a><\/h2>\n<h3 id=\"tocHeadRef\">Hotfix information<\/h3>\n<p>A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.<\/p>\n<p>If the hotfix is available for download, there is a &#8220;Hotfix download available&#8221; section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.<\/p>\n<p><b>Note<\/b> If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:<\/p>\n<div class=\"indent\"><a href=\"http:\/\/support.microsoft.com\/contactus\/?ws=support\">http:\/\/support.microsoft.com\/contactus\/?ws=support<\/a><\/div>\n<p><b>Note<\/b> The &#8220;Hotfix download available&#8221; form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.<\/p>\n<h4 id=\"tocHeadRef\">Prerequisites<\/h4>\n<p>To apply this hotfix, your computer must be running Windows Server 2008 R2 or Windows 7.<\/p>\n<h4 id=\"tocHeadRef\">Restart requirement<\/h4>\n<p>You do not have to restart the computer after you apply this hotfix.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Problem: Getting access denied error 5 when using Robocopy Solution: (h\/t Al, see KB979808 http:\/\/support.microsoft.com\/kb\/979808) (Quick hot fix download: 406633_intl_x64_zip) Consider the following scenario: You add a user account to the domain Backup Operators group or to the local Backup <a class=\"more-link\" href=\"https:\/\/www.torontohelpdesk.ca\/blog\/getting-access-denied-error-5-when-using-robocopy\/\">Continue reading <span class=\"screen-reader-text\">  Getting Access Denied Error 5 When Using Robocopy<\/span><span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[89],"class_list":["post-137","post","type-post","status-publish","format-standard","hentry","category-robocopy","tag-robocopy"],"_links":{"self":[{"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/posts\/137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/comments?post=137"}],"version-history":[{"count":3,"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/posts\/137\/revisions"}],"predecessor-version":[{"id":141,"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/posts\/137\/revisions\/141"}],"wp:attachment":[{"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/media?parent=137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/categories?post=137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/tags?post=137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}