add security grp to folders

Discussion in 'Scripting' started by James, Aug 31, 2005.

  1. James

    James Guest

    right click on folders, under security tab, this is the place where we put
    in our security grp.

    i've a c:\special and i want to add in machine's "Power user grp" with
    "Modify" access. Is there a script i can do it ?

    i want to apply to all machines who have c:\special directory.

    Pls advise
    James, Aug 31, 2005
    1. Advertisements

  2. In a batch

    if not exist "C:\Special" goto :EOF
    echo y| cacls "C:\Special" /e /g "Power Users:C"

    Put it in a startup script using group policy.
    Jerold Schulman, Aug 31, 2005
    1. Advertisements

  3. James

    James Guest

    is it better to use xcacls or just plain old cacls ?
    James, Sep 1, 2005
  4. For this specific task, cacls.exe is fine.

    For XCACLS, see tip
    8225 ยป The Extended Change Access Control List tool (Xcacls.vbs) has been enhanced and replaces Xcacls.exe.
    in the 'Tips & Tricks' at
    Jerold Schulman, Sep 1, 2005
  5. James

    langirl77 Guest

    I've got something similar working in a startup script through group policy,
    but I don't want to have to reboot 250 servers for the script to run. Is
    there a way to do this without having to reboot the servers?

    langirl77, Nov 1, 2005
  6. James

    MoiToo Guest

    [Not exact code - but an idea]
    Batch fiil...

    IF EXIST "C:\Special" goto ChangePermissions
    goto end
    cacls /e /c /g "NBTDOMAINNAME\Power Users":W
    goto end

    cacls (Change ACLs) is a reskit command - deploy it to each machine, and run
    something like psexec on each server (possibly VBS For/Next loop for each
    MoiToo, Nov 3, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.