{"id":19703,"date":"2020-11-05T06:19:16","date_gmt":"2020-11-05T00:49:16","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/?p=19703"},"modified":"2023-08-09T23:06:08","modified_gmt":"2023-08-09T17:36:08","slug":"reset-ntfs-permissions-file-and-folder","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/reset-ntfs-permissions-file-and-folder\/","title":{"rendered":"How to Reset File and Folder Permissions to Default (Inherited ACLs) in Windows"},"content":{"rendered":"<p>Incorrect permission entries assigned for a user account can prevent programs from accessing the file or folder. Or it may cause unauthorized users to have full access to the objects. In some cases, there may be a reference to obsolete user accounts (or SIDs) in the ACL (permissions list) that you want to clean up.<\/p>\n<p>Have you modified the NTFS permissions for a file or folder wrongly, and want to revert to default (inherited ACLs)?<\/p>\n<p>This article tells you how to replace the file or folder permissions with default inherited permissions quickly using the icacls.exe command-line. The information applies to all versions of Windows, from Windows Vista through Windows 10.<\/p>\n<p><!--more--><\/p>\n<h2>Reset NTFS Permissions for a File or Folder<\/h2>\n<p>Using the built-in <code>icacls.exe<\/code> console tool, you can quickly reset the NTFS permissions for a file or folder. This tool also has a feature where you can reset the permissions for files in a folder and sub-folders, recursively.<\/p>\n<ul>\n<li>The <code>icacls.exe \/reset<\/code> command-line replaces ACLs (list of permissions) with default inherited ACLs for all matching files or folders.<\/li>\n<\/ul>\n<p><strong>Important:<\/strong> Your user account needs full control permissions in order to reset or change the permissions of a file or folder. Lack of permissions would cause the error <code>Failed processing n files<\/code> when running the reset command. If that happens, make sure you first <a href=\"https:\/\/www.winhelponline.com\/blog\/take-ownership-of-file-or-folder\/\">take ownership and assign full control permissions<\/a> for your account.<\/p>\n<p>Let&#8217;s say you have the following permissions for a folder:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-19705\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/11\/icacls-reset-file-folder-perms-1.png\" alt=\"icacls reset permissions file or folder\" width=\"700\" height=\"408\" \/><\/p>\n<p>In the above image, you can see that there is a custom (non-inherited) permission entry for the user named <code>BackupUser<\/code>, for the <code>D:\\Docs<\/code> folder.<\/p>\n<ul>\n<li>To remove the unwanted permission entries, you can do so via the Advanced Security Settings dialog. But this can be tedious if you want to reset the permissions <em>en masse<\/em> for all files in a folder and subfolders. That&#8217;s where the built-in <code>icacls.exe<\/code> tool comes to the rescue.<\/li>\n<\/ul>\n<p>Running the <code>icacls.exe d:\\docs<\/code> command-line to view the folder permissions shows this:<\/p>\n<pre>OPTIPLEX-9020\\BackupUser:<strong>(OI)(CI)(M)<\/strong>\r\nBUILTIN\\Administrators:(I)(F)\r\nBUILTIN\\Administrators:(I)(OI)(CI)(IO)(F)\r\nNT AUTHORITY\\SYSTEM:(I)(F)\r\nNT AUTHORITY\\SYSTEM:(I)(OI)(CI)(IO)(F)\r\nNT AUTHORITY\\Authenticated Users:(I)(M)\r\nNT AUTHORITY\\Authenticated Users:(I)(OI)(CI)(IO)(M)\r\nBUILTIN\\Users:(I)(RX)\r\nBUILTIN\\Users:(I)(OI)(CI)(IO)(GR,GE)<\/pre>\n<ul>\n<li>The <code>(I)<\/code> entries denote that the permissions are inherited from the parent container. In the above ACL listing, there is only one non-inherited ACL entry for <code>BackupUser<\/code>.<\/li>\n<\/ul>\n<h3>Reset NTFS permissions for a file or folder<\/h3>\n<p>Use this command-line (from <a href=\"https:\/\/www.winhelponline.com\/blog\/open-elevated-command-prompt-windows\/\">admin Command Prompt<\/a>) syntax to reset the permissions for a file or folder.<\/p>\n<pre>icacls file_or_folder_name \/reset<\/pre>\n<p>To reset the <code>Docs<\/code> <strong>folder<\/strong> permissions, I&#8217;d run:<\/p>\n<pre>icacls d:\\docs \/reset<\/pre>\n<p>To reset an <strong>individual<\/strong> file&#8217;s permissions, I&#8217;d run:<\/p>\n<pre>icacls d:\\docs\\places.docx \/reset<\/pre>\n<p>To reset permissions for <strong>all files<\/strong> in a folder (e.g., <code>D:\\Docs<\/code>), run:<\/p>\n<pre>icacls d:\\docs\\* \/reset<\/pre>\n<h3>Reset NTFS permissions for a folder, its subfolders, and files<\/h3>\n<p>To reset the permissions for the <code>Docs<\/code> folder along with its sub-folder, and all the files <strong>recursively<\/strong>, run this command:<\/p>\n<pre>icacls d:\\docs \/reset \/t \/c<\/pre>\n<p><strong>Related command-line arguments:<\/strong><\/p>\n<ul>\n<li><code>\/t<\/code>\u00a0 &#8211; Performs the operation on all specified files in the current directory and its subdirectories.<\/li>\n<li><code>\/c<\/code> &#8211; Continues the operation despite any file errors. Error messages will still be displayed.<\/li>\n<li><code>\/q<\/code> &#8211; Suppresses success messages.<\/li>\n<li><code>\/l<\/code> &#8211; Performs the operation on a symbolic link instead of its destination.<\/li>\n<\/ul>\n<p>You&#8217;ll see an output like this:<\/p>\n<pre>processed file: d:\\docs\r\nprocessed file: d:\\docs\\Expenses.xlsx\r\nprocessed file: d:\\docs\\Places.docx\r\nSuccessfully processed 3 files; Failed processing 0 files<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-19706\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/11\/icacls-reset-file-folder-perms-3.png\" alt=\"icacls reset permissions file or folder\" width=\"699\" height=\"408\" \/><\/p>\n<p>The permissions for the <code>Docs<\/code> folder is now reset. This means the additional ACL entries will be gone. Only the inherited entries remain. If you had disabled inheritance earlier, the <code>icacls.exe \/reset<\/code> command-line would <strong>restore<\/strong> the inherited permissions back.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Incorrect permission entries assigned for a user account can prevent programs from accessing the file or folder. Or it may cause unauthorized users to have full access to the objects. In some cases, there may be a reference to obsolete user accounts (or SIDs) in the ACL (permissions list) that you want to clean up. &#8230; <a title=\"How to Reset File and Folder Permissions to Default (Inherited ACLs) in Windows\" class=\"read-more\" href=\"https:\/\/www.winhelponline.com\/blog\/reset-ntfs-permissions-file-and-folder\/\" aria-label=\"Read more about How to Reset File and Folder Permissions to Default (Inherited ACLs) in Windows\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[7],"tags":[106,250],"class_list":["post-19703","post","type-post","status-publish","format-standard","hentry","category-windows","tag-command-prompt","tag-icacls"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":46006,"url":"https:\/\/www.winhelponline.com\/blog\/shellnew-only-folder-listed\/","url_meta":{"origin":19703,"position":0},"title":"New Menu Shows Only &#8220;Folder&#8221; in the Desktop Context Menu","author":"Ramesh","date":"May 14, 2023","format":false,"excerpt":"When you right-click on the desktop and click New, the New menu may only show the \"Folder\" entry. The other options, such as \"Shortcut,\" \"Text document,\" and \"Bitmap image,\" may be missing in the New menu. It's not typical for the Desktop folder to show only the \"Folder\" entry, and\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"new menu lists only folder","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/05\/new-menu-lists-only-folder.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":19688,"url":"https:\/\/www.winhelponline.com\/blog\/compressed-zip-folder-error-file-not-found-no-read-permission\/","url_meta":{"origin":19703,"position":1},"title":"Compressed (Zipped) Folder Error &#8220;File not found or no read permission&#8221;","author":"Ramesh","date":"November 4, 2020","format":false,"excerpt":"When you try to create a compressed (zipped) folder in Windows 10, the following error occurs: Compressed (zipped) Folders Error File not found or no read permission. You may have noticed that this error doesn't happen on drives formatted as FAT32.\u00a0This article explains why this problem occurs and how to\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"compressed folder create error - no read permissions - process explorer","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/11\/procexp-find-locked-files.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/11\/procexp-find-locked-files.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/11\/procexp-find-locked-files.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3321,"url":"https:\/\/www.winhelponline.com\/blog\/wmp-overwrite-album-art-folder-thumbnails-fix\/","url_meta":{"origin":19703,"position":2},"title":"WMP Overwrites Album Art and Folder Thumbnails. How to Stop it?","author":"Ramesh","date":"June 22, 2016","format":false,"excerpt":"One of the biggest annoyances with Windows Media Player is that it sometimes overwrites your custom album art images as well as folder thumbnails, replacing them with lo-res images.The dimensions of the updated folder.jpg would be 200x200 as available from WMP's meta information source. But as we've seen before, exact\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"folder thumbnails with white border","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/06\/thumb-white-border-4.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":264,"url":"https:\/\/www.winhelponline.com\/blog\/take-ownership-of-file-or-folder\/","url_meta":{"origin":19703,"position":3},"title":"Change Ownership of a File or Folder Using Takeown Command-Line Tool","author":"Ramesh","date":"May 3, 2008","format":false,"excerpt":"Every file or folder in an NTFS volume has an owner. Certain system files are owned by TrustedInstaller, some by SYSTEM account, and others by the \"Administrators\" group. If a user creates a file or folder, that user is usually the owner of the file or folder. The owner is\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"Take Ownership using command-line takeown.exe","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/05\/takeown-cmd.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/05\/takeown-cmd.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/05\/takeown-cmd.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":9058,"url":"https:\/\/www.winhelponline.com\/blog\/failed-to-enumerate-objects-in-the-container-ownership\/","url_meta":{"origin":19703,"position":4},"title":"Fix: &#8220;Failed to Enumerate Objects in the Container&#8221; Error","author":"Ramesh","date":"May 6, 2019","format":false,"excerpt":"When you try to open a folder, you may see the message \"You don't currently have permission to access this folder.\u00a0Click Continue to permanently get access to this folder.\" Clicking on the Continue shows the message \"You have been denied permission to access this folder.\u00a0To gain access to this folder\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"failed to enumerate objects in the container - change ownership recursively sub-folders","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/w10-safe-mode-win-re.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":4122,"url":"https:\/\/www.winhelponline.com\/blog\/block-command-prompt-particular-user-permissions\/","url_meta":{"origin":19703,"position":5},"title":"How to Prevent Command Prompt Access for Specific Users","author":"Ramesh","date":"September 23, 2016","format":false,"excerpt":"Sometimes you may want to prevent a particular user from opening the Command Prompt window (cmd.exe) for a number of valid reasons. This article explains how to prevent specific users from opening the Command Prompt or running Windows batch files. Prevent Command Prompt Access for Specific Users Locking down the\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"block cmd.exe access for a user","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/09\/block-cmd-10.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/09\/block-cmd-10.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/09\/block-cmd-10.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/19703","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/comments?post=19703"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/19703\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=19703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=19703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=19703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}