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.
Asked
Active
Viewed 5,549 times
5
Commerce Pundit
- 111
- 10
mr. max
- 507
- 1
- 5
- 14
2 Answers
7
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
MaYaNk
- 1,730
- 1
- 16
- 27
-
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
-
this worked for me along with removing the generated folder, I used Magento 2.3.4 and PHP 7.2.29 and given the permission to Magento root folder takeown /F C:\xampp\htdocs\magento223 – Ankur Jain Apr 20 '20 at 06:38
4
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.
Lucky
- 41
- 3