Questions tagged [icacls]

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

Filter by
Sorted by
Tagged with
1 vote
0 answers
45 views

Windows 10 Professional with TeamGroup SSD 256 GB, 4 TB HDD from Seagate

My computer is having a serious problem since it's run out of disk space. I keep trying to fix it by moving everything over to my 4TB HDD but it's not letting me move files and my computer can't ...
Mikael Deon Thomas's user avatar
0 votes
0 answers
27 views

Different behaviors for restricted access of folders in local drive and network shared drive

I have the following file structure on both my local drive and the network shared drive: Parent Folder Folder A Folder B File A So, Folder A is a sub-directory of Parent Folder, and Folder B ...
kiwidude89's user avatar
0 votes
2 answers
154 views

Make folder visible to user but do not allow them to access its contents (icacls)

I have the following file structure: Parent Folder Folder A Folder B File A So, Folder A is a sub-directory of Parent Folder, and Folder B and File A are sub-contents of Folder A. I would ...
kiwidude89's user avatar
2 votes
2 answers
339 views

What is the difference between WDAC and WO (icacls)?

I am planning to give "change permissions" (WDAC) permission to user. However, I came across this (WO) permission which represents "take ownership". What is the difference between ...
kiwidude89's user avatar
3 votes
1 answer
378 views

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:\&...
kiwidude89's user avatar
0 votes
0 answers
70 views

How to have a FOR Loop in CMD return only the child items

I'm trying to create a FOR Loop that will TAKEOWN only the child items of a folder (folders and files) and not the parent folder. Here's what I have so far, which will work but I don't want to take ...
Austin Reed 's user avatar
0 votes
0 answers
3k views

"WARNING: UNPROTECTED PRIVATE KEY FILE!" - can not sign in to VPS Ubuntu-account from local Windows 10 computer

Following this authoritative article, I created the SSH keys at Windows local PC and copied them to VPS (this article does not cover the Windows case, but I found appropriate solution). Now, when I ...
Tokugawa Takeshi YD's user avatar
1 vote
1 answer
189 views

Why doesn't icacls remove a deny ACE

I am trying to discover how to use icacls to remove a specific DENY ACE In my test I deny a special permission like this: icacls mydirectory /deny me:(DC) Successfully processed 1 files; Failed ...
Rob Stevens's user avatar
0 votes
0 answers
722 views

How to reset additional partition ownership and permissions to default in Windows 11?

How do you set/reset a partition's default ownership and security permissions in Windows 11? For example, there might be Creator Owner, or Trusted Installer, etc... This is especially important when ...
elika kohen's user avatar
0 votes
1 answer
444 views

icacls on windows server 19 doesn't seem to work

First, I'm not a windows expert. Also, windows people that I've talked to do not seem to be familiar with "icacls", which I thought was strange. I found it via search. I see someone asked ...
Ron's user avatar
  • 3
3 votes
2 answers
4k views

How to set 600 permission on a .pem file in w10?

I am unable to change permissions to 600 on an AWS .pem file. Note that "inherited permissions" were turned off in all efforts, and owner was set properly. Tried using this guide with File ...
kmiklas's user avatar
  • 219
1 vote
1 answer
316 views

Give users permission to modify a file but deny permission to add new files to the folder in Windows 10

Been struggling with this since yesterday without success. Tried all kinds of combinations. I have 2 files - an EXE and a config file. When users start the EXE they should be able to save their ...
bolshed's user avatar
  • 11
4 votes
2 answers
4k views

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 ...
p-p-j's user avatar
  • 43
2 votes
0 answers
279 views

Access Denied for file; can't view/edit/delete file even after taking ownership

I have a set of Android Studio files that I cannot figure out how to "take" ownership of. I initially tried via the windows GUI prompt (right click -> security tab -> advanced button -&...
MisterMister's user avatar
0 votes
0 answers
244 views

Changing Permissions with icacls

I recently started copying files to my local NAS where I ran into some minor problems. I am able to do everything I want over windows file explorer but it takes some time so I thought I may be using ...
AlphaInc.'s user avatar
  • 179
0 votes
0 answers
45 views

Windows file copying is denied although user is granted full access

I'm trying to copy a file to another location. Because the destination folder was not originally owned by me, after searching "how to grant full access of file or folder to user on Windows", ...
Frank's user avatar
  • 3
0 votes
1 answer
518 views

Secedit.exe stops working after denying execution permission to AppData directory

I'm using the following command to deny execution permission to the AppData directory: icacls $env:userprofile\AppData /deny "*S-1-1-0:(OI)(CI)(X)" The problem is, that after doing this, I'...
anderZubi's user avatar
  • 121
-1 votes
1 answer
2k views

Icacls - Change permission invalid parameter

When I enter: icacls %SYSTEMROOT%\system32\drivers\etc\hosts "/E /G %USERNAME%:W" It says invalid parameter /E.
Hugo's user avatar
  • 1
1 vote
0 answers
1k views

Error with a folder security tab in Windows 10

On an external hard drive I have a folder which seems to have a problem. When I use software on it I have some error message, the only program with can open this folder looks like to be the file ...
Fractale's user avatar
  • 627
1 vote
1 answer
567 views

icacls destroys win 10

I saved my Win7 System paratition to an external drive. Then formatted and installed Win10 instead of Win7. Everything ok so far. In order to get access to all the files on the saved folders I ...
huha's user avatar
  • 193
0 votes
0 answers
272 views

icacls.exe doesn't show that ACL was inherited (I)

I noticed different behaviour of icacls.exe on two machines with Windows 10: Windows 10 Version 1809 (OS Build 17763.678) > echo "test" > file > icacls.exe file file NT AUTHORITY\SYSTEM:(F) ...
Marcin's user avatar
  • 1
0 votes
1 answer
582 views

How to gain r/w permissions to files administrator does not have permissions to?

The problem occurred to me while trying to apply mods to a game installed via Windows Store in Windows 10 (xbox gamepass in particular). The way installations work for this distribution method - ...
Corvin's user avatar
  • 101
0 votes
1 answer
264 views

Scrub away NTFS permissions on data files from previous installation of Windows

I recently did a clean installation of Windows 10 onto a new SSD, and restored my old data files onto the drive. The problem is, even though I told the backup program to NOT restore the permissions, ...
Bitbang3r's user avatar
  • 288
0 votes
1 answer
14k views

PowerShell Set permissions on a folder/directory from the command line

Is there a better / easier way to set permissions on a Windows folder from the command line? I am using powershell, get-acl and set-acl. # Set permissions on a folder using powershell, get-acl and ...
somebadhat's user avatar
  • 1,182
-4 votes
1 answer
7k views

Reset Windows 10 Permissions

I installed long time ago "Easy Context Menu" and added when I press right click, the option to "take ownership" from a folder/disk. Also long time ago I had plugged in my old C:/ HDD from my old ...
TryToHelp's user avatar
5 votes
1 answer
12k views

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 ...
user avatar
0 votes
1 answer
807 views

ICACLS Setowner to folders only

I need to give user_foo full control in all files and subdirectories in a \directory. user_foo is the owner of the /directory. user_foo has own some subdirectories but not all subdirectories. icacls ...
mert's user avatar
  • 1
1 vote
2 answers
7k views

How do you set Windows file permissions/security options non-recursively?

I somehow botched up my C:\ (root folder) security settings on Windows 10. They remained botched even after an in-place reinstall and somewhat botched after a full (no-save) reinstall. Right now if I ...
FNE's user avatar
  • 117
0 votes
1 answer
2k views

Denied permission to access external USB Drive [closed]

I've tried to recover a 14.5GB drive but I've run into some trouble. The drive is already formatted FAT32. When inserting the drive when logged into my normal (Admin) user, I get an error saying i ...
Flerovium's user avatar
0 votes
1 answer
2k views

How do I remove a the Users group from everyone's user profile folder in Windows 7/2008?

I am forced to add a user who may only have access to one folder. Therefore, I need to remove the users and domain users permissions from all of my files. Right now, every users can see eachother's ...
eng3's user avatar
  • 247
1 vote
1 answer
13k views

Icacls Grant all users access to a folder including new files?

I use the following command (in an admin batch file) to grant all users (specifically users on the network) full access to a folder and all its contents: Icacls %fold% /grant Everyone:F /inheritance:...
Mark Deven's user avatar
  • 1,598
0 votes
1 answer
2k views

Granting IIS_IUSRS access to a Web Application folder

Trying to add a folder on D:\ as a virtual directory to a Web Site in IIS. "Obviously" I need to add an ACL to the folder for the security principal IIS uses. This appears, most of the time, to be ...
Chris Becke's user avatar
1 vote
1 answer
1k views

icacls - Integrity level is not apply on the exe file

I have an exe file that run as Medium integrity by default. I tried to change its integrity to Low with the following statament : icacls 1.exe /L The output message show its succeed : 1.exe ...
BattleTested_закалённый в бою's user avatar
0 votes
0 answers
216 views

How to reset user permissions on system files and registry keys to the state when Windows was installed?

I currently have Windows 10 Pro version 1803 (build 17134.254) installed. Thing is, I did some stuff to user permissions on some files and registry keys and I believe I might have also affected some ...
computationalprince's user avatar
0 votes
1 answer
2k views

Is there a way to change the 'Advanced Permissions' of a file in Windows using command line?

So just to clarify: I would like to remove the advanced permission called "Change permissions" because even if you remove permissions from a group (in this case administrators) using icacls, while no ...
Mike Z's user avatar
  • 1
3 votes
2 answers
8k views

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 ...
Jean-Francois T.'s user avatar
0 votes
1 answer
76 views

How can I use Icalcs to grant access to a specific machine on the network?

In a Batch File I want to use Icacls to grant access to either all users (preferable) or a specific user on a remote machine. Currently, if I grant access to the user Joe, any machine on the network ...
Mark Deven's user avatar
  • 1,598
0 votes
1 answer
1k views

icacls - Invalid parameter error

With Server 2008 R2, I'm using the following command and it works well: icacls “D:\wamp\apache” /grant “run_apache”:(OI)(CI)RX /T However, using icacls “D:\wamp\apache\logs” /grant “run_apache”:(OI)...
David H Petersen's user avatar
3 votes
0 answers
1k views

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

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)...
George R.'s user avatar
  • 131
0 votes
1 answer
475 views

Granting windows service file access

I'm attempting to run a connection with openssh by using a service. Unfortunately, openssh requires that the authentication key is readable only by the one user who intends to well..use it (If there's ...
Excludos's user avatar
  • 103
1 vote
1 answer
13k views

Why can't I remove a group with icacls from a file after revoking read access?

Why can't I remove a group from a file if it is being denied read permission even though I have read permission from my account, am part of the Administrators group, and I'm running icacls from an ...
Zhro's user avatar
  • 867
3 votes
1 answer
1k views

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 ...
Zhro's user avatar
  • 867
2 votes
1 answer
1k views

Why do I get a privilege error when running "takeown" from the command line?

I am part of the Administrators group. I have a file which I can change ownership from myself to HOSTNAME\Administrators and back just fine using the Security tab in the file properties. I can also ...
Zhro's user avatar
  • 867
0 votes
1 answer
2k views

Files can still be modified even after setting ''Read-only'' permission by ICACLS. Why is it not working?

I am the administrator in my PC and there are some other users on it. I set a folder (Gabi) as "Read only" for a specific user (Alice), using ICACLS via the Command Prompt (I am using ...
kaly's user avatar
  • 3
0 votes
0 answers
146 views

Set Read Permissions to logged in AD User

i would like to set Read Only Permissions to a folder i created with a startup script: md D:\Projects\%USERNAME% Only the logged in AD User should have Read Permissions on this Folder. I tried it ...
Azulol's user avatar
  • 1
1 vote
1 answer
8k views

Replace folder permissions with icacls

I want to replace a folder's permissions. First I did this: icacls folder /grant user:(oi)(ci)f Then I want to change the permissions and the inheritance to: icacls folder /grant:r user:(oi)(io)rx ...
liamZ's user avatar
  • 131
2 votes
1 answer
784 views

Run batch with icacls as scheduled task

I a batch file that fix permissions in ALL the Tree of a docomentum storage. it sits in a UNC operation directory. goSetPriv.bat @echo off set /a _cnt=0 set _docdir="UNC_DCTM_PATH_TO_SCAN\*" if (%...
Roey Peretz's user avatar
0 votes
0 answers
817 views

How do I stop a systemic "Error 1310. Error writing to file: C:\Config.Msi\*rbf."?

Whenever I try to install or uninstall an MSI program on my parents' computer, it fails with the message, "Error 1310. Error writing to file: C:\Config.Msi*rbf. Verify that you have access to that ...
NobleUplift's user avatar
  • 1,575
1 vote
0 answers
107 views

Find folder without permission inheritance

How can I recursively find which folder doesn't have permission inheritace enabled?
Tobia's user avatar
  • 2,253
10 votes
4 answers
11k views

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 ...
Geesh_SO's user avatar
  • 445