Hi. I was wondering if anyone has any idea how to prevent Windows user to delete and create folders / files in a specific path and its sub-folders.
I'm using a python script to create a specific folder structure (based on Git-Repositories).
The aim is to keep users from altering this structure. They are allowed to create and delete folders / files on the "lowest" levels of this folder structure (so they can work within this framework).
I've already tried setting a command using the subprocess library:
I create the folders iterative. So I could use a specific command for each and every folder - should something like this exist.
Any help would be very appreciated!
I'm using a python script to create a specific folder structure (based on Git-Repositories).
The aim is to keep users from altering this structure. They are allowed to create and delete folders / files on the "lowest" levels of this folder structure (so they can work within this framework).
I've already tried setting a command using the subprocess library:
cmd = f'icacls "{D:\Git}" /deny Everyone:(WD,AD) /T /C /L /Q' subprocess.run(cmd, shell=True)But this doesn't seem to do anything. When I try to execute the command in a cmd-window I just get an error message that 0 Files haven been changed and one error occured.
I create the folders iterative. So I could use a specific command for each and every folder - should something like this exist.
Any help would be very appreciated!
![[Image: Uf226vx.png]](https://i.imgur.com/Uf226vx.png)