cacls

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

倾然丶 夕夏残阳落幕 提交于 2019-12-11 07:44:30
问题 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 well-known SIDs of the user "everyone" (S-1-1-0), but it seems as if I can't use them with cacls. I tried cacls . /e /t /p S-1-1-0:f . Is there a way to use windows command line tools for this jobs? I'm not allowed to bundle software or other

icacls Deny Everyone Directory Delete Permission

房东的猫 提交于 2019-12-11 03:48:56
问题 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 as I can still delete the folder and all files within it. 回答1: I think i found a solution: icacls pics /deny Everyone:(OI)(CI)(DE,DC) which denies the specific rights to delete (DE) and to delete childs (DC) . To get this language independent use *S

Undeletable Folder in java

 ̄綄美尐妖づ 提交于 2019-12-02 20:31:52
问题 I tried to create a Undeletable folder using java code. I use the command "cacls (Foldername) /e /c /d %username%" in command prompt it worked fine.Then i tried to implement in my java class (Eclipse IDE). It doesn't work. UndeletableFolder.java import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; public class UndeletableFolder { public

Undeletable Folder in java

无人久伴 提交于 2019-12-02 11:34:11
I tried to create a Undeletable folder using java code. I use the command "cacls (Foldername) /e /c /d %username%" in command prompt it worked fine.Then i tried to implement in my java class (Eclipse IDE). It doesn't work. UndeletableFolder.java import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; public class UndeletableFolder { public static void main(String args[]){ Runtime rt = Runtime.getRuntime(); String cmd=("cacls hidden /e /c /d