Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 4 down vote accepted
icacls D:\bar /grant:r foo:(oi)(ci)r

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

(/grant:r to replace existing perms)

share|improve this answer
    
Only one problem, is that you are granting, so you are giving more permissions. In the first command I want to give only read permission. Then grant modification over .dbf –  jperelli May 3 '12 at 17:49
1  
ok, I found out: is /grant:r. Editing accordingly –  jperelli May 3 '12 at 18:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.