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

Sharing folder in Batch file does not share

First off I am completely new here and pretty new to scripting so hopefully I am not being too stupid but I am trying and keep bumping into a wall here. What I am trying to do is to make a batch script that creates a folder and then shares this…
sjowol
  • 1
  • 1
0
votes
1 answer

How can I give read-only perms to a file-structure and allow write on certain folders?

So I am trying to use icacls to only let a user add and access documents inside folders with specific keywords. I cannot get exactly what I want however. Anyone have any tips? I am unfamiliar with Windows' permissions. Thanks! Here is the code I…
Sentenial
  • 61
  • 1
  • 10
0
votes
0 answers

Powershell: icACLs chokes on paths with spaces

I'm looping through a directory structure and saving the permissions from each directory inside itself using icACLs.exe. I need to use robocopy to find all the paths since the a lot of the full paths exceed 260 characters. Some also include…
0
votes
0 answers

file_get_contents fails for one particular folder

I'm using Windows platform - $file_data = file_get_contents('C:/Apache24/htdocs/../zip/myfile.pdf'); This works absolutely fine but $file_data = file_get_contents('C:/Apache24/htdocs/../zip/user@domain.com/myfile.pdf'); where user@domain.com is my…
M3ghana
  • 1,231
  • 1
  • 9
  • 19
0
votes
0 answers

Using ICACLS to set permissions on folder and new files, but excluding a specific folder

I am trying to use ICACLS to set the permissions on a directory. I want all new and existing objects in the directory to have the permissions I set, EXCEPT one specific folder I know the name of. This folder does not need the permissions and is…
Seephor
  • 1,692
  • 3
  • 28
  • 50
0
votes
1 answer

Set permissions with icacls with rules from a textfile in powershell

I'm trying to use Icacls in Powershell, to set local permissions. I have a textfile from which I get the permissions. I do it like this, because I want to change permissions of a lot of folders and I don't want to change the script every…
Clam
  • 75
  • 2
  • 11
0
votes
0 answers

How do I change the permissions of the Boot folder?

I want to change the permissions on the folder "C: \ Boot" on Windows 7. Currently the owner is TrustedInstaller. I make some changes with a script, but I need to have all permissions. I tried it with the command icacls C:\Boot /T /grant…
0
votes
1 answer

How to list CACLS (rights) for a folder and log to disk

What I want to know is how can I write the CACL rights of a folder recursively (folders and files) out to disk. I want to write two different folders out and compare them using two output files in a tool like winmerge. I have a website that works…
kyleb
  • 1,968
  • 7
  • 31
  • 53
0
votes
1 answer

Can't extract a zip file with jar -xf even after granting full permissions using icacls

First i had to suffer to make the icalcs grant full permissions to everyone in a folder as i didn't know that i should write "Tout le monde" instead of "everyone" as my windows 7 language is french and actually i needed this command for that i can…
Bardelman
  • 2,176
  • 7
  • 43
  • 70
0
votes
1 answer

PowerShell to find usernames that have access

I am trying to get the ACL of a set of folders to see if a specific user is listed For example Users | ---Person1 ---Person2 ---Person3 Person1 to 3 are home folders. We recently ran an icacls command to modify the folder permission. Some…
software is fun
  • 7,286
  • 18
  • 71
  • 129
0
votes
1 answer

Remotely Changing permissions of file pushed to W7 machine using smbclient

I have a file that I want to transfer to a remote machine that is running W7 32 bit I have a script that enables me to push the file to the machine from a linux management server, using a combination of: 1) smbclient to mount the Admin share on the…
user1447903
  • 303
  • 2
  • 7
  • 14
0
votes
2 answers

Concatenating in Excel For Loop to make batch file of commands

Consider this scenario: I have a client who has two network shares on a server. Each share contains an identical list of folders representing each project (one is for current data, and the other share for archived data). Each project folder contains…
0
votes
2 answers

icacls Deny Delete for Everyone Not Working

I am trying to deny all users from being able to delete a file. I'd like any user to be able to read or exeucute the file, but not modify or delete it. However, after I use the following code via the command prompt, no one can even access the file…
TechDude
  • 111
  • 1
  • 3
  • 12
0
votes
0 answers

Batch Command Not Outputting with Copied Exe

The basic situation is this. If I call icalcs using either of these: icalcs /grant:r C:/Windows/System32/icalcs /grant:r I get a result of: processed file: Successfully processed 1 files; Failed processing 0…
Abyssul
  • 65
  • 1
  • 6
0
votes
1 answer

Information on runas command

This question may be duplicate but since I didn't find any answer I am posting it here My username has space in between; so how should I write it while using runas; should I use double quote or single quote or \ e.g. runas /noprofile…
Ravi Yadav
  • 405
  • 4
  • 16