Answer the question
In order to leave comments, you need to log in
Why did docker containers stop running after changing the permissions for the var, www, html folders?
I have Ubuntu 18.04 OS. I want to raise my Drupal project using Docker, namely Docker4Drupal - which contains the necessary images for locally lifting a Drupal site.
After writing the command , I have php, mariadb, ngnix, phpmyadmin, mailhog, crond, adminer, traefik, nodedocker-compose up -d
images/containers running . But when I wrote the command , I saw that the node container (node.js image) is not in the list of running / running. Having registered the command, I found out that the reason is that there are not enough rights to the folder:docker ps
docker-compose logs node
error Could not write file "var/www/html/nodebuild/yarn-error.log": EACESS: permission denied, open 'var/www/html/path/to/theme/to build/yarn-error.log' "
sudo chmod -R 666 /var
sudo chmod -R 666 /var/www
sudo chmod -R 666 /var/www/html
sudo chmod -R 666 /var/www/html/nodebuild
sudo chmod 777 /var/ -R
sudo chmod 777 /var/www/ -R
sudo chmod 777 /var/www/html -R
sudo chmod 777 /var/www/html/nodebuild -R
docker-compose up -d
and docker ps
I saw that now there are only three containers in the list of running / running (phpmyadmin, traefik, mailhog). Папка | Права | Права в цифровом формате | Владелец | Группа
var | drwxr-xr-x | 755 | root | root
www | drwxrwxrwx | 777 | root | root
html | drwxrwsrwx | 777 | andriy | andriy
bc_news | drwxrwxr-x | 775 | andriy | andriy
Answer the question
In order to leave comments, you need to log in
Congratulations bro!
Prize on the topic "How to ruin the system with one command and it should not be rm -rf /" - to the studio!
Now you will have to rearrange if there is no operating system at hand, from which you could carefully manually transfer the rights to the folders.
But it will stick in memory for a long time - that you should not do some things. You were asked for permissions on a separate file, and you broke the permissions on the entire /var - the place where the rights are most spread out.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question