Skip to content

icacls problem

Featured Replies

Hi

I have Windows 10 v1511 Enterprise 64 bit.

I noticed that the icacls "<Home_directory_path>" /inheritance:e /Q /T /C /L command, applied to the home directory of a directory structure, is run only the first level of the structure. Why?

How do I run it automatically in all the levels below?

 

I also noticed that if I write the icacls "<Home_directory_path>" /reset /Q /T /C /L command, it goes in a loop. Why? What should I write in order to avoid this?

 

Thanks

 

Bye

  • Author

Apparently, the commands

 

 

 

 
takeown /F "<Home_directory_path>" /A /R /D S /SKIPSL
 
 
icacls "<Home_directory_path>" /reset
 
 
icacls "<Home_directory_path>" /reset /Q /C /T /L
 
 
pushd "<Home_directory_path>" && ( rd /S /Q "<Home_directory_path>" 2>nul & popd )
 

 

 

reach my goal but the third command goes in loop and, to stop it, I have to press Ctrl+C. Why?

 

 

How do I do that the third command does not go in loop?

 

 

Thanks

 

 

Bye

  • Author

I think I found the best solution to remove a directory structure which also contains symbolic links and with ACLs managed by TrustedInstaller or Authenticated Users or System users:

 

 

takeown /F "<Directory_path>" /A /R /D Y /SKIPSL >nul 2>&1
icacls "<Directory_path>" /reset
icacls "<Directory_path>" /grant:r Administrators:(OI)(CI)F /inheritance:e /Q /C /T /L >nul 2>&1
pushd "<Directory_path>" && ( rd /S /Q "<Directory_path>" 2>nul & popd )

 

Thanks

 

Bye

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.