Questions tagged [icacls]

Windows command that displays or modifies discretionary access control lists (DACLs) on specified files, and applies stored DACLs to files in specified directories. Inheritor of the older CACLS command.

Useful links:

  1. iCACLS on technet.
  2. iCACLS on SS64 help pages.
99 questions
0
votes
1 answer

Get permission to delete windows profile folder

I need to make a script that can delete unused windows profile folders. I have a problem with getting permission to delete windows profile folders with PowerShell. Getting ownership with takeown.exe works fine since I can see I get the ownership of…
Michael Kirkegaard
  • 379
  • 1
  • 3
  • 14
0
votes
1 answer

Use icacls.exe to set special folder permissions for a domain user

I have a folder and I wonder how I can use icacls.exe to set its permissions to be special for a certain user so it looks like below?
Tak
  • 3,536
  • 11
  • 51
  • 93
0
votes
1 answer

How to log the result of batch file running the icacls command in for loop in cmd?

I wrote a batch file to provide folder(D:\Test) access to list of user present in a txt(D:\users) file . Now I want a log file(D:\log) having names of who were provided access. Here is my code: FOR /F "delims=" %%A in (D:\users.txt) DO icacls…
0
votes
1 answer

using icacls to assign one user to their specific username named folder

So I have 200 folders each with a name created from a group in active directory. for example.. C:/project/Users/ and within users i have a list of 200 folders .. John Doe Jane Doe Adam Scott Cabir Notad and so on and so forth.. I need every folder…
0
votes
0 answers

icacls /deny (de and d) doesn''t work

I'm truin to use icacls to prevent file deletion I tried : icacls /deny Everyone:D - icacls /deny users:D - icacls /deny administrator:D but this prevents me from accessing the file and I can't execute it I then tried de instead of d but in this…
0
votes
1 answer

reading results of icacls /save with FSO object of VBScript fails

I need to save the results of running ICACLS command, change them, and restore the changed permissions back. I use vbscript to do that. The issue is that reading lines or whole data from the saved gives me 1 character and a bunch of spaces in…
0
votes
1 answer

Replace permissions with icacls.exe

We have a lot of folders with the following permissions: PS C:\> icacls.exe C:\Temp\Test C:\Temp\Test BUILTIN\Administrators:(OI)(CI)(F) NT AUTHORITY\SYSTEM:(OI)(CI)(F) DOMAIN\USER:(OI)(IO)(RX) …
Patrick
  • 2,128
  • 16
  • 24
0
votes
0 answers

ICACLS Failed Processing Files on Sub folders

Currently I am working on a batch file to grant or deny permission to all of the users on execution of the batch file. The problem I am facing is that the command which I am working on provides an output of "Failed Processing 1 files Here is the…
x0nar
  • 125
  • 2
  • 10
0
votes
1 answer

batch script permission grant for specific folders

I have a script that currently looks for all files/subfolders in directories named 'Avid MediaFiles' and grants full control permissions + outputs the results into a text file. cd /d Y:\UserWorkspaces FOR /D /r %%g in ("Avid MediaFiles*") DO icacls…
0
votes
0 answers

Remove Inverted commas for only part of Batch file

I have created a batch file for a client to create a project directory I have to add quotation marks when creating the root folder for wexample "A001 test project" This then created all the directories as i want. When it comes to the ICACLS, it…
0
votes
1 answer

How to remove all inherited permissions for directory with SubInAcl.exe?

How to remove all inherited permissions for directory with SubInAcl.exe? I can do this with icacls by using /inheritance:r Is there a way to do the same with SubInAcl?
NoSkill
  • 718
  • 5
  • 15
0
votes
2 answers

How to capture all output from icacls.exe in PowerShell

We have a script that runs once a week and adjusts all permissions on a specific file share. I mainly use a PowerShell script for this but also execute icacls.exe in some parts. As there are lots of files, errors will occur when running…
mariu5
  • 445
  • 1
  • 8
  • 23
0
votes
1 answer

Does this ICACLS command also apply the settings onto childitems?

I'm trying to use ICACLS in powershell to set a few permissions. Does this ICACLS command also apply the permission onto childitems in the same run? icacls "D:\Folder" /grant "Domain\ADGroup":(OI)(CI)RX If so, is there a way to turn this off? Can't…
mariu5
  • 445
  • 1
  • 8
  • 23
0
votes
1 answer

Re-acl from text file

This one is stumping me. I am trying to do this with PowerShell, but it does not have to be... Basically, I have a text file containing ACLs information for a large directory structure that has been migrated (I realize there is much to be desired…
0
votes
1 answer

icacls refuses string for username

I am trying to change access permissions for a list of files (recursively): $global:unc = "\\.\" # unc-format $files = Get-ChildItem c:\Users\loli\test\ -Filter *.txt -Recurse -Force | % { $_.FullName } $username = Read-Host giveAccess…
Linz
  • 9
  • 5