Cacls Recursive Wildcard

Cacls Recursive Wildcard

I have a user named foo and I want him to have only read permission over all files and folders in folder D:/bar

Inside the folder I have a lot of folders and there are .dbf files scattered.

I want to give read and write permission for the *.dbf files to the user foo, but only read permission for this user to all the other files and folders within D:/bar.

How can I do that using calc or icalcs?

EDIT: It could be a batch script too, if necessary

0

1 Answer

icacls D:\bar /grant:r foo:(oi)(ci)r

icacls D:\bar\*.dbf /t /grant foo:m

(/grant:r to replace existing perms)

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

James H. Sterling
Author

James H. Sterling

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.