I want set write permission to folder pub/static in magento 2 in windows localhost. can anyone help me how to set write permission to folder usig CLI.


You can give write permission by running below command in your CLI.

takeown /F <folder name>

For Example:

 takeown /F C:\wamp\www\Magento\www\pub\static
  • After apply takeown /F magento2.3, still i am getting error like 'generated' directory permission is read-only. How can i give write permission in windows ? – zus Dec 15 '18 at 10:21

you can Use takeown command to give write permission to the file

takeown /r /d y /f *

^ Recursively give permission to all files without prompting "are you sure".

Use following with icacls set the access control list

icacls * /t /grant Everyone:F

This will recursively grant Full access to user group "Everyone" to all files in the folder.

Your Answer

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

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