11

When XP clients move files on the same volume, the permissions are moved with it. With Windows 7 clients and up, when a file is moved, the permissions are inherited.

Unfortunately, we still have a lot of Windows XP clients which after time causes our file server to be a bit of a mess. What is the best way to recursively go through an entire volume and reset file permissions (not directory) so that they inherit their parent directory. Can XCALCS do this?

Ryan Mortier
  • 498
  • 3
  • 8
  • 19
  • 1
    How about right-clicking each parent directory, going to Properties, then Security tab, then click Advanced, then click Change Permissions, then check that checkbox that says "Replace all child object permissions with inheritable permissions from this object"? – Ryan Ries Sep 09 '13 at 17:21
  • @RyanRies Put this as answer. – Lorenz Meyer Sep 09 '13 at 18:05
  • I just used this to recursively enable inheritance: icacls "C:\someFolderWithSubfolders" /inheritance:e /T – Zar Shardan Oct 27 '18 at 13:47

2 Answers2

12

How about right-clicking each parent directory, going to Properties, then Security tab, then click Advanced, then click Change Permissions, then check that checkbox that says "Replace all child object permissions with inheritable permissions from this object"?

If you have a ton of parent directories and you want to script this instead of doing it by hand:

icacls "c:\parentDirectory\*" /q /c /t /reset

Shoud have the same effect as clicking the Replace all child object permissions with inheritable permissions from this object checkbox.

Ryan Ries
  • 55,481
  • 10
  • 142
  • 199
  • Manually right clicking is definitely not going to work, too many random directories. The icacls thing is exactly what I was looking for. Thanks. – Ryan Mortier Sep 09 '13 at 21:05
1

Combine these 2 commands on elevated CMD or PowerShell:

takeown  /f  C:\Windows\CSC\v2.0.6\namespace\  /r
icacls  C:\Windows\CSC\v2.0.6\namespace\ /t  /grant everyone:F
Stuggi
  • 3,506
  • 4
  • 19
  • 36
  • Granting everyone full control over a subdirectory of Windows is not what the original poster wanted to know how to do. In fact, it opens up a security hole so wide that any locally-authenticated user can drive a proverbial Mack truck through it. – sjcaged May 09 '20 at 11:21
  • Locally-authenticated users is the Authenticated Users group. Everyone means literally that...everyone globally, even users who are not members of the current domain. – Nilpo Aug 25 '20 at 10:22