Giter Club home page Giter Club logo

Comments (3)

J0WI avatar J0WI commented on August 19, 2024 2

Are they owned by www-data?

from docker-joomla.

kernusr avatar kernusr commented on August 19, 2024

I have the same problem and I can’t figure out how to solve it
All files in the /var/www/html owned by root and the chown www-data:www-data -R /var/www/html does not change the situation

For running container i use docker-compose, with next config:

version: '3'
services:
    joomla:
        image: joomla
        restart: always
        ports:
            - 80:80
            - 443:443
        environment:
            JOOMLA_DB_HOST: mysql
            JOOMLA_DB_PASSWORD: local
            JOOMLA_DB_USER: local
            JOOMLA_DB_NAME: local
        volumes:
            - ./html:/var/www/html
        depends_on:
            - mysql
    mysql:
        image: "mysql:5.7"
        volumes:
            - ./mysql:/var/lib/mysql
        environment:
               MYSQL_ROOT_PASSWORD: root
               MYSQL_DATABASE: local
               MYSQL_USER: local
               MYSQL_PASSWORD: local
        ports:
            - "3306:3306"

My OS is Windows 10 Pro
Docker version 19.03.8, build afacb8b
docker-compose version 1.25.4, build 8d51620a

from docker-joomla.

Llewellynvdm avatar Llewellynvdm commented on August 19, 2024

I know this is years to late.... but this is now resolved as you can start the container with the correct ownership of this files and so be able to edit the files without any trouble.

version: '2'
services:
  mariadb_test:
    image: mariadb:latest
    container_name: mariadb_test
    restart: unless-stopped
    environment:
      - MARIADB_DATABASE=${VDM_TEST_DB}
      - MARIADB_USER=${VDM_TEST_DB_USER}
      - MARIADB_PASSWORD=${VDM_TEST_DB_PASS}
      - MARIADB_ROOT_PASSWORD=${VDM_TEST_DB_ROOT}
    volumes:
      - "${VDM_PROJECT_PATH}/test/db:/var/lib/mysql"
    networks:
      - traefik
  joomla_test:
    image: joomla:4
    container_name: joomla_test
    restart: unless-stopped
    environment:
      - APACHE_RUN_USER=#1000
      - APACHE_RUN_GROUP=#1000
      - JOOMLA_DB_HOST=mariadb_test:3306
      - JOOMLA_DB_NAME=${VDM_TEST_DB}
      - JOOMLA_DB_USER=${VDM_TEST_DB_USER}
      - JOOMLA_DB_PASSWORD=${VDM_TEST_DB_PASS}

So the ENV keys you will like to use are:

- APACHE_RUN_USER=#1000
- APACHE_RUN_GROUP=#1000

Remember the # as this is how Apache wants the values, we then in turn update the ownership of the /var/www/html folder with that ID and GROUPID.

This must correspond to the ID of the user where the folder is mounted and will be editing the files.

from docker-joomla.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.