cacls applied to empty directory

  • Thread starter Thread starter rob merritt
  • Start date Start date
R

rob merritt

hi I have a directory on a number of servers I want protected .
currently the dir is empty so using CACLS I want to set the acls via:

mkdir "\\ABS1s\e$\Shares\Office\Admin Notes\"
cacls "\\ABS1s\e$\Shares\Office\Admin Notes\" /C /P "@MIS":C <
yes.txt
cacls "\\ABS1s\e$\Shares\Office\Admin Notes\" /E /c /P "Domain
Admins":F < yes.txt
cacls "\\ABS1s\e$\Shares\Office\Admin Notes\" /E /c /P "@Elementary
Principals":C < yes.txt
cacls "\\ABS1s\e$\Shares\Office\Admin Notes\" /E /c /P "@Elementary
Vice Principals":C < yes.txt

ony I get:
The system cannot find the file specified.

Admin Notes is the directory I want protected.
 
rob merritt said:
hi I have a directory on a number of servers I want protected .
currently the dir is empty so using CACLS I want to set the acls via:

mkdir "\\ABS1s\e$\Shares\Office\Admin Notes\"
cacls "\\ABS1s\e$\Shares\Office\Admin Notes\" /C /P "@MIS":C <
yes.txt
cacls "\\ABS1s\e$\Shares\Office\Admin Notes\" /E /c /P "Domain
Admins":F < yes.txt
cacls "\\ABS1s\e$\Shares\Office\Admin Notes\" /E /c /P "@Elementary
Principals":C < yes.txt
cacls "\\ABS1s\e$\Shares\Office\Admin Notes\" /E /c /P "@Elementary
Vice Principals":C < yes.txt

ony I get:
The system cannot find the file specified.

Admin Notes is the directory I want protected.


Some commands don't like the trailing backslash, cacls is one of them. Try
this:

cacls "\\ABS1s\e$\Shares\Office\Admin Notes" /C /P "@MIS":C <yes.txt

And if you don't want to mess with yes.txt, try this:

Echo y|cacls "\\ABS1s\e$\Shares\Office\Admin Notes" /C /P "@MIS":C
 
Back
Top