x_old_misp_docker icon indicating copy to clipboard operation
x_old_misp_docker copied to clipboard

config.php ownership changes to root:root after saving config changes

Open sycophantic opened this issue 3 years ago • 1 comments

After building the docker image and starting it on Ubuntu 18.04 or Centos7 ./data/web/app/Config/config.php becomes owned by root:root after making config changes. This causes MISP to break. I'm unsure of the source of the permissions change.

sycophantic avatar Jan 19 '22 22:01 sycophantic

I'm seeing something similar. In v2.4.151 I was able to volume mount the config file with no issue. Ever since v2.4.153 I can no longer mount the config file.

I tested with the a clone of this repo running on Ubuntu 20.04 LTS. The only change I made was to volume mount the one config file in docker-compose. It worked in v2.4.151, but not since.

When I mount, as I always have, with -v config.php:/var/www/MISP/app/Config/config.php it throws the following errors during startup:

"Warning error: rename(/var/www/MISP/app/tmp/Skjignwe,var/wwwMISP/app/Config/config.php): Device or resource busing in [/var/www/MISP/app/Model/Server.php, line 2275]"

Error: Could not rename /var/www/MISP/app/tmp/Skjignwe to config file var/wwwMISP/app/Config/config.php

I set a constant ls command to print the perms on config.php and discovered that it's being set to root:root even though the perms on the file I'm mounting are 750 web-data:web-data.

Oddly, I can get around the issue if I mount the entire /Config directory to the container.

chais0n avatar Jun 20 '22 14:06 chais0n