Questions tagged [icacls]

`icacls` is a command-line program shipped with Microsoft Windows. It is used to edit user permissions for files and directories.

icacls is a command-line program shipped with Microsoft Windows. It is used to edit user permissions for files and directories, which are stored in so-called Access Control Lists associated with each securable object.

78 questions
22
votes
1 answer

Explain the output of ICACLS.EXE, line by line, item by item

What does this mean: C:\foo\> icacls . . NT AUTHORITY\IUSR:(M) BUILTIN\IIS_IUSRS:(M) BUILTIN\IIS_IUSRS:(OI)(CI)(M) NT AUTHORITY\IUSR:(OI)(CI)(M) BUILTIN\IIS_IUSRS:(I)(OI)(CI)(RX) NT AUTHORITY\IUSR:(I)(OI)(CI)(RX) NT…
Cheeso
  • 2,119
  • 9
  • 27
  • 34
15
votes
1 answer

Command line to permanently get access to folder

UPDATE While I was able to use the method described in accepted answer once it failed a second time or was just giving too much trouble. Searching further I found SetACL by Helge Klein which is far far superior and does exactly what is needed. I…
Miserable Variable
  • 942
  • 2
  • 12
  • 30
11
votes
1 answer

Cygwin mkdir makes directory I don't have permissions to

Using latest version of cygwin64 in Windows 10. I have managed to get a directory foo that has something strange about its permissions. I'm not quite sure how this happened but here are the symptoms: $ cd /f/temp/foo $ ls -lad . drwxrwx---+ 1 Mm…
M.M
  • 522
  • 5
  • 19
10
votes
3 answers

Regardless of Windows language, how can I make the ICACLS command set a folder to have full access to everyone?

Background Say I have this command icacls C:\FullyAccessibleFolder /grant Users:(OI)(CI)F This works fine in English versions of Windows, but does not seem to work in French versions, giving the following error, presumably due to Users being…
Geesh_SO
  • 445
  • 1
  • 5
  • 17
8
votes
2 answers

icacls is giving access denied on remote file system

I am working on remote drive mounted on my system where i created some file i need to set some permission for that file. I used icacls but its not working. When i am trying to access file permission its working fine. Z:\test_permission>icacls…
Abhishek
  • 83
  • 1
  • 1
  • 3
6
votes
2 answers

batch script that grants admin rights and goes through all files and folders

I have this, pretty sure its a little harsh but does the job, gives me all the rights to the files and folders on a drive when run on a drive, now I need help getting it to go into sub directories, so I dont need to copy the bat script inside every…
nwgat
  • 1,091
  • 1
  • 11
  • 12
5
votes
1 answer

Understanding 'Access Denied' so that permissions can be reverted - icacls and takeown

Before taking ownership of files and folders I would like to understand how to view the current permissions so that they may be reverted. I am reciving an 'Access Denied' message to view or save permissions with elevated command prompt for…
user900431
4
votes
2 answers

What does “ICACLS C:\Windows\winsxs” do?

Originally posted by me on Stack Overflow, reposted here because this seems like a more relevant site for this question. Some wording has been slightly edited and more information has been added. When typing "icacls /?" into Windows command prompt,…
p-p-j
  • 43
  • 1
  • 4
3
votes
1 answer

Permissions on new created files (Windows 7 specific)?

Maybe a noob question, but how ALCs are determined on new created files (by running MyApp.exe)? I'd like to grant "users" full control on new files created inside C:\ProgramData\MyApp when launching myapp.exe. However this is not working: icacls…
gremo
  • 225
  • 3
  • 15
3
votes
1 answer

Why would the NTFS ACL utility `icacls` alter the system partition behind the scene?

I attached an hdd to my win7 machine and assigned the drive letter I: to the only partition on the hdd. The hdd was originally from another computer, and to avoid all those "you don't currently have permission..." dialogs, I decided to use icacls to…
netvope
  • 5,215
  • 14
  • 57
  • 77
3
votes
1 answer

Strange behaviour on /deny DE,W with icacls

I have the following scenario where I (admin) applied the (DE,W) deny permissions to the following folder test_folder for test_user who already has inherited modify permissions from parent folder: B:\>icacls test_folder test_folder …
kiwidude89
  • 55
  • 2
3
votes
2 answers

Setting a file to "Read-Only" in Windows with ICACLS

I knew how to set a file Read-Only with cacls: cacls "toto.txt" //E //P Everyone:N cacls "toto.txt" //E //G Everyone:R It removed all rights for everyone and then only added "Read" right. How to do the same thing with icacls? In particular, I…
Jean-Francois T.
  • 620
  • 2
  • 7
  • 19
3
votes
0 answers

How to get the equivalent of chmod 600 using icacls on Windows?

I'm looking for a way to achieve the equivalent of chmod 600 on Windows using the icacls utility. For the user part I got the rw permission by using icacls file /inheritance:r /grant:r %USERNAME%:(R,W). Now, I'm having troubles with denying all the…
George R.
  • 131
  • 4
3
votes
1 answer

How to use takeown and icacls to deny access to other users?

What is the Windows equivalent to: chown $USER chmod 600 file From what I understand, this requires that inherited permissions be disabled (because HOSTNAME\Users is inherited) and all groups outside of myself and Administrators be removed. Can…
Zhro
  • 837
  • 2
  • 15
  • 31
3
votes
1 answer

Create List of Access Denied Files & Folders

I want to make a list of access denied files/folders for a given account. I'm aware "icacls" handles making lists of files/folders given an account name. e.g. This command lists access denied per folder on screen: icacls c:\*. /findsid "User" /T…
whatever1234566
  • 159
  • 1
  • 11
1
2 3 4 5 6