I use Docker for my project. After installing the 2.2.6 package with sample data, it gives me problems like the following when I execute php bin/magento cache:clean
The file “/var/www/html/src/generated/code/Magento/Backend/App/Request/PathInfoProcessor/Proxy.php” cannot be deleted Warning!unlink(/var/www/html/src/generated/code/Magento/Backend/App/Request/PathInfoProcessor/Proxy.php):
No such file or directory
The generated/code
folder can not be deleted and I have to restart my computer then it does let me delete the folder
I use php 7.1.22 , percona 5.6.39 and docker Version 18.06.1-ce-win73 (19507)
4
Answers
Installing magento 2 from the command line of the container in Docker solves the problem of writing permissions in Windows for me
You may need to adjust the parameters:
This happens due to insufficient permissions on the project folder and files.Also www-data must be owner of the project if using Apache as web-server.
Please execute commands given below:–
Just in case anyone stumbles upon this:
Add the following to your docker file
This will allow you to switch to root and run chown
An important mania for people who offer their help is to think that all systems are the same.
www-data is the user as long as there are conditions, which many will not meet, because they prefer to use nginx + php-fpm instead of the generalist model.
Other times, included in that model is not the user running Appache, nginx or in the end, php, is www-data.
So the most correct answer is not:
Lo mas correcto serĂa
Once we have that data then if we can execute
And please, stop paying attention to those who always write chmod -R 777
Or one day they will wake up without their site in a normal way but full of infections that are hardly curable.