Command Line / Batch File set permissions for folders / files

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

How Do I set/change permissions on Folders or Files using
the Command Line (or in a batch file)?

(I am creating a batch file to automate some stuff and
after creating a directory, I need to uncheck the inherit
from parent, add one user with Modify rights and remove
Everyone)
 
Alex said:
How Do I set/change permissions on Folders or Files using
the Command Line (or in a batch file)?

(I am creating a batch file to automate some stuff and
after creating a directory, I need to uncheck the inherit
from parent, add one user with Modify rights and remove
Everyone)
Hi

Some options for you:

1)
I don't know but cacls.exe (comes builtin with WinXP), or xcacls.exe
(in WinXP Support Tools) might be able to do this.

HOW TO: Use Xcacls.exe to Modify NTFS Permissions
http://support.microsoft.com/default.aspx?scid=kb;en-us;318754

Windows XP Service Pack 2 Support Tools
http://www.microsoft.com/downloads/details.aspx?FamilyID=49ae8576-9bb9-4126-9761-ba8011fabf38

Xcacls.exe have some issues:

Child objects in a folder do not inherit permissions as expected
when you use Xcacls.exe with the /E switch
http://support.microsoft.com/default.aspx?scid=KB;EN-US;822790


2)
I'm pretty sure xcacls.vbs is able to to it:

Download details: Extended Change Access Control List Tool (Xcacls)
http://www.microsoft.com/downloads/...24-0616-473c-b103-c35bc2820bda&displaylang=en


3)
FILEACL.exe should be able to do it:

FILEACL.exe - NTFS Permissions command line tool
http://www.microsoft.com/downloads/...ea-34f0-4e6d-9a72-004d35de4e64&DisplayLang=en


4)
I know that SetACL.exe can do it:

SetACL.exe (freeware)
http://setacl.sourceforge.net/
 
Back
Top