{"id":2343,"date":"2022-11-04T16:33:46","date_gmt":"2022-11-04T14:33:46","guid":{"rendered":"https:\/\/itsimple.info\/?p=2343"},"modified":"2022-11-04T16:33:48","modified_gmt":"2022-11-04T14:33:48","slug":"how-to-restore-ntfs-permissions-on-a-folder-files-backup-or-copy","status":"publish","type":"post","link":"https:\/\/itsimple.info\/?p=2343","title":{"rendered":"How to Restore NTFS Permissions on a folder &#038; files, Backup or Copy"},"content":{"rendered":"\n<p>Some Time when playing around with share folder. Wrong click can destroy the hole sub-tree of folder permissions allowing UN-authorise users access to sensitive folders. you can restore the NTFS permissions with build in tool call ICALCS and you can manage the NTFS with it . To see NTFS permissions (D:\\temp = example directory) :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\nD:\\>icacls D:\\temp\nD:\\temp BUILTIN\\Administrators:(I)(F)\n        BUILTIN\\Administrators:(I)(OI)(CI)(IO)(F)\n        NT AUTHORITY\\SYSTEM:(I)(F)\n        NT AUTHORITY\\SYSTEM:(I)(OI)(CI)(IO)(F)\n        NT AUTHORITY\\Authenticated Users:(I)(M)\n        NT AUTHORITY\\Authenticated Users:(I)(OI)(CI)(IO)(M)\n        BUILTIN\\Users:(I)(RX)\n        BUILTIN\\Users:(I)(OI)(CI)(IO)(GR,GE)<\/pre>\n\n\n\n<p>Successfully processed 1 files; Failed processing 0 files<\/p>\n\n\n\n<p>The command will return a list of users and groups that have been assigned access permissions. Permissions are specified using abbreviations<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>F<\/strong>&nbsp;\u2013 full access<\/li><li><strong>M&nbsp;<\/strong>\u2013 modify access<\/li><li><strong>RX<\/strong>&nbsp;\u2013 read and execute access<\/li><li><strong>R<\/strong>&nbsp;\u2013 read-only access<\/li><li><strong>W<\/strong>&nbsp;\u2013write-only access<\/li><li><strong>D<\/strong>&nbsp;\u2013 delete<\/li><\/ul>\n\n\n\n<p>Inheritance rights are specified before access permissions (inheritance permissions are applied only to folders):<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>(OI)<\/strong>&nbsp;\u2013 object inherit<\/li><li><strong>(CI)<\/strong>&nbsp;\u2013 container inherit<\/li><li><strong>(IO)<\/strong>&nbsp;\u2013 inherit only<\/li><li><strong>(I)<\/strong>&nbsp;\u2013 inheriting permissions from parent container<\/li><\/ul>\n\n\n\n<p>With ICACLS you can add, remove or change permissions,for example to grant the user john read and execute permissions :<\/p>\n\n\n<p>icacls D:\\temp \/grant pc\\john:RX<\/p>\n\n\n<p>You can even use the ICACLS to change ownership of a file or folder : <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">icacls 'D:\\temp' \/setowner PC\\john \/T \/C \/L \/Q<\/pre>\n\n\n\n<p>To Back up NTFS permissions and this could be running also on the root directory :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">icacls D:\\temp \/save c:\\backup\\d-temp_perms.txt \/t \/c<\/pre>\n\n\n\n<p><strong>Note<\/strong>.\u00a0<strong>\/t<\/strong>\u00a0key is used to get ACLs for all subdirectories and files,\u00a0<strong>\/c<\/strong>\u00a0allows to ignore access errors. By adding\u00a0<strong>\/q<\/strong>\u00a0option, you can disable the display of information about successful access to the file system objects. Depending on the number of files and folders, the export of permissions can take quite a <strong>long time<\/strong> .<\/p>\n\n\n\n<p>To restore the NTFS permissions with ICACLS :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">icacls D:\\ \/restore c:\\backup\\d-temp_perms.txt \/t \/c<\/pre>\n\n\n\n<p><strong>Note<\/strong>. Please, note that when importing permissions from the file, you should specify the path to the parent directory instead of the folder name.<\/p>\n\n\n\n<p>in case you need to reset the folder permission to default :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">icacls D:\\temp \/reset \/T \/Q \/C<\/pre>\n\n\n\n<p>More information can be found here :<\/p>\n\n\n\n<p><a href=\"http:\/\/woshub.com\/how-to-backup-and-restore-ntfs-permissions-using-icacls\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Set, Copy, Export or Restore NTFS Permissions Using iCACLS? | Windows OS Hub (woshub.com)<\/a><\/p>\n\n\n\n<figure class=\"wp-block-pullquote has-vivid-green-cyan-color has-text-color has-large-font-size\" style=\"font-style:normal;font-weight:800\"><blockquote><p>Good Luck<\/p><\/blockquote><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Some Time when playing around with share folder. Wrong click can destroy the hole sub-tree of folder permissions allowing UN-authorise users access to sensitive folders. you can restore the NTFS permissions with build in tool call ICALCS and you can manage the NTFS with it . To see NTFS permissions (D:\\temp = example directory) : [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,12,14,15],"tags":[],"class_list":["post-2343","post","type-post","status-publish","format-standard","hentry","category-tech","category-tutorials","category-windows","category-windows-server"],"_links":{"self":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/2343","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2343"}],"version-history":[{"count":0,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/2343\/revisions"}],"wp:attachment":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}