Openemr/openemr:flex - permission denied error

I keep getting errors when I deploy to docker.

2023-08-24 17:19:40 chown: /var/www/localhost/htdocs/openemr/.git/objects/pack/pack-0b2dedd03a1a1545b5524afc2a3088db1c8322c7.pack: Permission denied
2023-08-24 17:19:40 chown: /var/www/localhost/htdocs/openemr/.git/objects/pack/pack-0b2dedd03a1a1545b5524afc2a3088db1c8322c7.idx: Permission denied
2023-08-24 17:19:40 chown: /var/www/localhost/htdocs/openemr/.git/objects/info/commit-graph: Permission denied

Ever few seconds the openemr restarts and runs.

How can I resolve this?

Hi Simba, i’m also getting the same error, did you got a resolution to your problem. thanks.

Hi @simba1309
You can try out these steps and check,

  1. Install docker(for Ubuntu 22.04.1) and check for running for docker service.
    sudo apt install docker.io
    sudo systemctl status docker # if not, start the docker service using ‘sudo systemctl start docker’
  2. Pull the docker image and run the image by exposing ports 80 and 443
    sudo docker pull openemr/openemr:flex
    sudo docker run -p 80:80 -p 443:443 --name openemr_flex openemr/openemr:flex
  3. The docker takes a series of long steps and finally completes it with this log.
    Screenshot 2023-10-26 at 5.23.30 PM.png
  4. Try logging into the docker container and check whether the apache is the owner of the openemr directory and check the permissions.
    Screenshot 2023-10-26 at 5.25.30 PM.png

Please feel free to reach out us for further queries at openemr.support@visolve.com
-ViSolve AI Team