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
0 votes
0 answers
20 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 ...
user avatar
0 votes
0 answers
34 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 ...
user avatar
0 votes
0 answers
26 views

How to add multiline commands to right-click menu in Windows 11?

I want to add code bellow. takeown /f {Right-Clicked-Directory} /r icacls {Right-Clicked-Directory} /T /Q /C /RESET icacls {Right-Clicked-Directory} /grant "%USERDOMAIN%\%USERNAME%":(F) /t ...
user avatar
0 votes
1 answer
15 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 ...
user avatar
0 votes
0 answers
45 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 ...
user avatar
0 votes
0 answers
47 views

Start menu won't open after running icacls /reset

I followed a poor recommendation on how to fix voice recorder as I explained in this thread Apps located on WindowsApps folder won't open after I deleted the folders from one of the apps inside I ...
user avatar
  • 113
0 votes
1 answer
25 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 ...
user avatar
  • 3
0 votes
1 answer
673 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 ...
user avatar
  • 179
1 vote
1 answer
62 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 ...
user avatar
  • 11
0 votes
0 answers
105 views

Can't take ownership of file as NT-Authority\System, can't read/write, cant reset ACLs

I've got a folder inside my work git repo, a script in WSL terminated while writing out a packfile and it seems to have corrupted ACLs that don't have any visible owner authority. PS C:\Users\alice\...
user avatar
  • 121
4 votes
2 answers
2k 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 ...
user avatar
  • 43
2 votes
0 answers
46 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 -&...
user avatar
0 votes
0 answers
83 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 ...
user avatar
  • 179
0 votes
0 answers
30 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", ...
user avatar
  • 3
0 votes
1 answer
120 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'...
user avatar
  • 121
-1 votes
1 answer
359 views

Icacls - Change permission invalid parameter

When I enter: icacls %SYSTEMROOT%\system32\drivers\etc\hosts "/E /G %USERNAME%:W" It says invalid parameter /E.
user avatar
  • 1
0 votes
0 answers
726 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 ...
user avatar
  • 561
1 vote
1 answer
305 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 ...
user avatar
  • 183
0 votes
0 answers
160 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) ...
user avatar
  • 1
0 votes
1 answer
250 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 - ...
user avatar
  • 101
0 votes
1 answer
130 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, ...
user avatar
  • 258
0 votes
1 answer
11k 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 ...
user avatar
  • 1,144
-4 votes
1 answer
6k 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 ...
user avatar
4 votes
1 answer
8k 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
482 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 ...
user avatar
  • 1
0 votes
2 answers
3k 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 ...
user avatar
  • 107
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 ...
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 ...
user avatar
  • 217
1 vote
1 answer
7k 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:...
user avatar
  • 1,268
0 votes
1 answer
1k 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 ...
user avatar
1 vote
1 answer
792 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 ...
user avatar
0 votes
0 answers
179 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 ...
user avatar
0 votes
1 answer
1k 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 ...
user avatar
  • 1
3 votes
2 answers
5k 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 ...
user avatar
0 votes
1 answer
67 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 ...
user avatar
  • 1,268
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)...
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)...
user avatar
  • 131
0 votes
1 answer
420 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 ...
user avatar
1 vote
1 answer
10k 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 ...
user avatar
  • 756
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 ...
user avatar
  • 756
2 votes
1 answer
808 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 ...
user avatar
  • 756
0 votes
1 answer
1k 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 ...
user avatar
  • 3
0 votes
0 answers
59 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 ...
user avatar
  • 1
1 vote
1 answer
7k 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 ...
user avatar
  • 121
2 votes
1 answer
545 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 (%...
user avatar
0 votes
0 answers
629 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 ...
user avatar
  • 1,395
1 vote
0 answers
78 views

Find folder without permission inheritance

How can I recursively find which folder doesn't have permission inheritace enabled?
user avatar
  • 2,154
10 votes
3 answers
9k 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 ...
user avatar
  • 435
2 votes
1 answer
2k views

How to transfer Full Control ACL to named administrator account from CMD prompt?

Trying to give my named Administrator account (the account I use to log in to Windows) Full Control ACL permission across ALL files and folders. What is the command line to do this and/or could ...
user avatar
  • 39
0 votes
0 answers
276 views

How to get deletion rights for old Windows folder in cmd [duplicate]

I have an old Windows installation on a secondary HDD and I can't format it because there's data on it. I therefore want to delete E:\Windows but haven't got sufficient rights. So I first took ...
user avatar
  • 1,951