Possible Duplicate:
Change Windows 7 file permissions from command prompt

How can I change file permissions in Windows 7 using a command?

link|improve this question
feedback

migrated from stackoverflow.com Dec 15 '10 at 8:33

This question came from our site for professional and enthusiast programmers.

closed as exact duplicate by nhinkle, Diago Dec 15 '10 at 10:27

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

2 Answers

You can use the takeown command.

Have a look at the following articles:

Microsoft

Seven Forums

link|improve this answer
feedback

Windows comes with a special command line utility called CACLS.

You can use it as follows:

CACLS files /e /p {USERNAME}:{PERMISSION}

Where,

* /p : Set new permission
* /e : Edit permission and kept old permission as it is i.e. edit ACL instead of replacing it.
* {USERNAME} : Name of user
* {PERMISSION} : Permission can be:
      o R - Read
      o W - Write
      o C - Change (write)
      o F - Full control

For example grant Betty Full (F) control with following command (type at Windows command prompt):

C:> CACLS files /e /p betty:f

Read complete help by typing following command:

C:> cacls /?
link|improve this answer
feedback