{"id":5355,"date":"2021-10-28T02:59:28","date_gmt":"2021-10-28T02:59:28","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=5355"},"modified":"2021-10-28T02:59:28","modified_gmt":"2021-10-28T02:59:28","slug":"taking-ownership-and-adding-full-permissions-for-paths-over-260-characters","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/taking-ownership-and-adding-full-permissions-for-paths-over-260-characters","title":{"rendered":"Taking Ownership and Adding Full Permissions for Paths over 260 Characters"},"content":{"rendered":"<p>Open Powershell As Administrator<\/p><p><code>Import-Module NTFSSecurity<\/code><\/p><p>#Check Existing Access<\/p><p>dir2 &#8220;\\\\?\\e:\\folde\\path\\name&#8221; -Recurse | Get-NTFSAccess<\/p><p>#Take Ownership<\/p><p>dir2 &#8220;\\\\?\\e:\\folde\\path\\name&#8221; -Recurse | Set-NTFSOwner -Account &#8220;Administrators&#8221;<\/p><p>#Add Permissiosn<\/p><p>dir2 &#8220;\\\\?\\e:\\folde\\path\\name&#8221; -Recurse | Add-NTFSAccess -Account Administrators -AccessRights FullControl<\/p><p>#recheck Access<\/p><p>dir2 &#8220;\\\\?\\e:\\folde\\path\\name&#8221; -Recurse | Get-NTFSAccess<\/p><p>Prove access for a user<\/p><p>Get-ChildItem -Path c:\\docs -Recurse -Directory | Get-NTFSEffectiveAccess -Account &#8216;corp\\confroom\u2019 | select Account, AccessControlType, AccessRights, FullName<\/p>","protected":false},"excerpt":{"rendered":"<p>Open Powershell As AdministratorImport-Module NTFSSecurity#Check Existing Accessdir2 &#8220;\\\\?\\e:\\folde\\path\\name&#8221; -Recurse | Get-NTFSAccess#Take Ownershipdir2 &#8220;\\\\?\\e:\\folde\\path\\name&#8221; -Recurse | Set-NTFSOwner -Account &#8220;Administrators&#8221;#Add Permissiosndir2 &#8220;\\\\?\\e:\\folde\\path\\name&#8221; -Recurse | Add-NTFSAccess -Account Administrators -AccessRights FullControl#recheck [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3627,3625,3628,3626,1602,3624,576],"class_list":["post-5355","post","type-post","status-publish","format-standard","hentry","category-research","tag-3627","tag-acl","tag-char","tag-get-access","tag-limit","tag-ntfssecurity","tag-powershell"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/5355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=5355"}],"version-history":[{"count":7,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/5355\/revisions"}],"predecessor-version":[{"id":5364,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/5355\/revisions\/5364"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=5355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=5355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=5355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}