Setting special permission on files and folders from a script

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Amihai Bareket (amihai73_at_hotmail.com)
Date: 03/17/05


Date: Thu, 17 Mar 2005 09:12:18 +0200

Ok, Here's my problem -
I'm using scripts (Batch, VBScript) to create multiple directories with
different permissions on the folders.
When I create a new folder I need to set ACL so specific user groups will
have modify permission to all objects that will be created under that
directory, but won't be able to modify the directory folder itself (delete
or rename).
Because I need to use inheritance, changing the permission on the folder
itself will change the permission also on subfolders that will be created.
I know how to do this from Windows GUI (modify permissions for subfolders
and files only), but how can I do it from a script?

I normally use CACLS or XCACLS to set ACL on files and folders.

Any Ideas?



Relevant Pages

  • Re: Network shares cannot connect
    ... Changed value to 0 just waiting to re-boot the server and test logins. ... Workstation Name: - ... let's focus on the Users Shared Folder first. ... To check this permission, please click the Advanced button, select ...
    (microsoft.public.windows.server.sbs)
  • Re: Network shares cannot connect
    ... Changed value to 0 just waiting to re-boot the server and test logins. ... Workstation Name: - ... let's focus on the Users Shared Folder first. ... To check this permission, please click the Advanced button, select ...
    (microsoft.public.windows.server.sbs)
  • Re: Save but should not delete
    ... One of my xp prof domain users has a shared folder on his pc which other ... I have checked every permission but if i don't give modify ... If a user has Modify Permission he can delete it. ... If word worked like notepad then during the save you run out of disk space (or ...
    (microsoft.public.windows.server.general)
  • MCSA/MCSE Self-training book from MS PRESS for exam 70-215 incorrect on file permission questions?
    ... includes the AccountingDept folder, which contains documents specific to the ... accounting department. ... The Accounting group includes all members of the ... AccountingDept folder by granting Read permission to the Accounting group ...
    (microsoft.public.win2000.file_system)
  • Re: Practice Test with Wrong Answers?
    ... "The Modify permission does not include the Delete Subfolders and Files ... so permanent employees cannot delete files form the Progress ... When I try this out the modify permissions for the parent folder get ...
    (microsoft.public.cert.exam.mcsa)