cacls applied to empty directory

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.
 
M

Marty List

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
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top