Questions tagged [cacls]

Windows command that Displays or modifies discretionary access control lists (DACL) on specified files.

Useful links:

  1. CACLS on technet.
  2. CACLS on SS64 help pages.
41 questions
7
votes
1 answer

Change owner and permissions on folder

I have the below script, it works fine, but how do I set it to keep security settings and add additional 'person' to the security group... ...and can cacls change the 'owner' of the folder? I tired /e to edit instead of replace but it doesn't like…
Pavle Stojanovic
  • 525
  • 2
  • 8
  • 30
3
votes
1 answer

Cacls, Windows 7, full permissions, local names

I need to grant full access permissions on folder using (deprecated on win7) Cacls. It seems to me that i have to use with cacls localized usernames and groupnames. E.g.: cacls foldername /T /E /C /G Users:F This gave me error "No mapping between…
Aleksandr Kravets
  • 5,750
  • 7
  • 53
  • 72
3
votes
1 answer

How to get effective permission of a NTFS file using command line?

As per subject, is there a command or may be even a sample VBScript that I can use to calculate/read effective permission of a file in Windows XP and Windows Server 2003 OS? All I want is to be able to get same information as I see in "effective…
user837208
  • 2,487
  • 7
  • 37
  • 54
3
votes
1 answer

Locking folder with cacls not working

So I've been trying to make an app that would lock a folder. It was working just fine until I added a jtextfield where you could specify the path of the folder and the name of the folder. This is the array to lock and unlock the folder: String[]…
Teodor Vecerdi
  • 326
  • 1
  • 2
  • 13
3
votes
2 answers

icacls Deny Everyone Directory Delete Permission

I am trying to deny all users from being able to delete a folder (as well as its contents, if possible). What I currently have is not working. icacls pics /deny Everyone:(OI)(CI)(DE) Using the above line neither protects the folder nor its content…
TechDude
  • 111
  • 1
  • 3
  • 12
3
votes
2 answers

Correct format of a UNC path for CACLS for a remote folder

I would like to list the ACLs on a file that is shared on a remote machine (I do have all the admin permissions) It is available in \win2003ad\testfolder When I run the command cacls \\win2003ad\testfolder I get the error "The network path could…
Bartosz
  • 4,406
  • 7
  • 41
  • 80
2
votes
2 answers

CACLS Confusion

During my NSIS setup script for a WinForms app, I use the following CACLS command to give the Users group full rights to a subfolder: Exec 'CACLS "$INSTDIR\SubFolder" /E /T /C /G "Users":F' So in effect the CACLS command executed is something…
codeulike
  • 22,514
  • 29
  • 120
  • 167
2
votes
1 answer

(Windows Server 2003) CACLS.EXE usage

I have a path with the following privileges: E:\MY_PATH BUILTIN\Administrators:(OI)(CI)F NT AUTHORITY\SYSTEM:(OI)(CI)F BUILTIN\Administrators:F …
UltraCommit
  • 2,236
  • 7
  • 43
  • 61
1
vote
2 answers

How to use CACLS in c# windows service

i want to block certain folder from users, using c# service. that means when you are starting the service though it is blocked or not, the final result is blocked folder. i have writen a code. but the responce is are you sure? please help to solve…
lankitha
  • 283
  • 7
  • 15
1
vote
1 answer

when I use USB drive, how can I achieve CACLS and ICALS functionality?

I need to create a directory, which is not having the functionality of a normal one. I used the CACLS and ICACLS commands to make the directory as Secured and undeletable to others. It was worked successfully when the directory present in my system…
Aerrow
  • 12,086
  • 10
  • 56
  • 90
1
vote
0 answers

I need to automatically allow access to private key

I have search and could not find anything specifically relating to my issue. My client made changes last week with regards to service accounts etc after a malware attack. Now my software does not authenticate via A.D. accounts anymore. I used a…
1
vote
2 answers

Getting owner of file from smb share, by using python on linux

I need to find out for a script I'm writing who is the true owner of a file in an smb share (mounted using mount -t cifs of course on my server and using net use through windows machines). Turns out it is a real challenge finding this information…
kaki gadol
  • 1,116
  • 1
  • 14
  • 34
1
vote
1 answer

Change permission of all files with specific extension in a folder and subfolders using CMD

How to change permission of all files with extension .pyc in a folder and its sub-folder? individually it will be like this: c:\folder1> cacls *.pyc /P everyone:F c:\folder1\a> cacls *.pyc /P everyone:F c:\folder1\b> cacls *.pyc /P everyone:F and…
1
vote
2 answers

How to change the file ACL in windows, if I only know the SID?

I want to change the ACL of a file and set "full permissions" to a special user. I know the cacls-command cacls . /e /t /p Everyone:f But this only works if the OS is english. For german systems, it must be cacls . /e /t /p Jeder:f. I know the…
Christian Kuetbach
  • 15,850
  • 5
  • 43
  • 79
1
vote
1 answer

icacls C:\Users\%username%\AppData\Local\Mozilla\updates /q /c /t /deny users:F

I want to deny permission to mentioned folder for current user to access,modify,read. Using icacls. icacls C:\Users\%username%\AppData\Local\Mozilla\updates /q /c /t /deny users:F But i am getting error "The system cannot find the path…
1
2 3