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
1
vote
2 answers

Appending saved ICACLS settings in a loop from file

Assuming list of files or folders in C:\temp\listoffolders.txt for /f eol^=^"^ delims^=^" %a in (C:\temp\listoffolders.txt) do cmd.exe /c icacls "%a" /save C:\temp\listoffolders.txt\iCACLSBackup.txt The output is perfect... but the issue I need to…
thatotheritguy
  • 83
  • 1
  • 1
  • 6
1
vote
0 answers

How to run icacls with runas successfully?

I have a problem with my code which I cannot find (I am unable to debug due to different servers issue). I am trying to run a command that set permissions on a folder but I also want to run it as s different user. So when I start my program and it…
Ivoles
  • 11
  • 1
1
vote
1 answer

Odd issue when feeding icacls an external variable

Good morning. I am having an issue with a batch script I have. I have a program that feeds it a variable and I use that variable to create a folder and then apply Icalcs permissions on it. For some reason it will create the folder with the variable…
MattMack
  • 23
  • 6
1
vote
0 answers

cygwin chmod and windows 7 file permission problems

I've found a number of posts over the past several years on closely related topics. However, I wonder if anyone has any specific advice for the following situation. I am a casual user of cygwin 2.4.0-1 on Win7 SP1. I have used cygwin for many…
KCW
  • 21
  • 3
1
vote
1 answer

Verify / Check permissions of all running Windows services

I am trying to verify permissions of all services running on windows. Though verifying permissions individually is quite painful. Is there any way of piping the result from windows command net start to icacls, to identify permissions for all…
Muhammad Suleman
  • 727
  • 4
  • 13
  • 24
1
vote
1 answer

icacls function not overwriting the previous directory permissions

I am using the following code: icacls C:\testscott\ /grant:r "TestGroup":(NP)F However, the existing permissions in the directory C:\testscott\ are still there. I thought using the /grant:r option meant it would overwrite the existing permissions?
Scott
  • 86
  • 1
  • 12
1
vote
0 answers

Accented Characters in Folder Paths from StdOut from icacls causing problems

I'm writing a vbscript to tidy up permissions on the various Windows file shares, and hit into a problem I've not yet been able to overcome. This part of the script first runs a basic icacls to pull back the current permissions for the path…
Andrew
  • 11
  • 2
0
votes
1 answer

DigitCert SMIME certificate cannot be exported. Personal Information Exchange - PKCS #12 (.PFX) option was greyed out in export wizard

As part of ensuring secure communication in our company we are trying to export SMIME certificate issued by Digicert unto our clients but we encountered few issues with regards to private keys not included or exportable during the exportation…
john zuh
  • 59
  • 1
  • 11
0
votes
0 answers

Grant permissions to hidden folder using Icacls (i.e. folder$)

I am running 'Icacls "\\server\folder$" /e /g "security_group_name":c' from Windows cmd prompt and all I receive is "The network name cannot be found." I know for a fact that the hidden folder exists because I am able to navigate to it from Windows…
0
votes
0 answers

Command of ICACLS in PowerShell

I am trying to use ICACLS in PowerShell (not cmd prompt) to remove all the NTFS rights. and then give the following rights: Administrators and System: have Full Control – Folder, subfolders and files Users: have Editing – Folder, subfolders and…
0
votes
1 answer

ICACLS and unicode file/folder names - the tool changes characters and is unable to locate files/folders

I'm trying to fix permissions on users folders created with Folder Redirect. I need "Domain Admins" group to have full access. Everything works as long as folder name is not using unicode characters. And there a quite many folders like that :( For…
0
votes
1 answer

How can I reset the permissions of files via powershell that originated from a user's personal directory?

I've run into an issue where users scan PDFs via the copy machine into their personal user folder on a file server. (The copier has a domain user account that owns a subfolder within each users' personal folder (D:\FileShare\Users\JohnSmith\Scans)…
0
votes
2 answers

'Invalid parameter "%Username%"' error when trying to grant permission by Icacls to current user

From this answer to question Windows SSH: Permissions for 'private-key' are too open I knew about command Icacls "C:\Users\XX\Path\To\File" /Grant:r "%Username%":"(R)" but in my environment (windows 10) it does not work: Invalid parameter…
Takeshi Tokugawa YD
  • 670
  • 5
  • 40
  • 124
0
votes
0 answers

Windows 10 - How can I fix - C:\ Ace entries not in canonical order

I have run into an issue with my windows backup software that I believe is due to an issue with permissions on my C:\ drive. I am using cygwin which can cause issues. The problem manifests itself by the Veritas SRS software not being able to…
user1279887
  • 489
  • 4
  • 20
0
votes
1 answer

Remove network drive permissions of a user in all subdirectories

I am trying to remove a user from all subdirectories in a network share. I have tried the following command: ICACLS X:\ /remove:g username /T The command runs without failure (although it takes 3.5 hours due to the size of the shard drive) but after…
Vlad
  • 13
  • 4