Skip to content

Bug: permission issues introduced with version 3.0.0 #186

@colisee

Description

@colisee

Permission issues introduced with version 3.0.0:

Error-1: entrypoint.sh: cp : cannot create regular file '/config/config.php': Permission denied

How to reproduce:

  • No directory /home/docker: it will be createt when running docker compose up
  • docker-compose.yml file
services:
  librebookingdb:
    image: linuxserver/mariadb:10.6.13
    restart: always
    volumes:
      - /home/docker/librebooking_test/db_conf:/config
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
      - MYSQL_ROOT_PASSWORD=password

  librebookingweb:
    image: librebooking/librebooking:4.2.0
    restart: always
    depends_on:
      - librebookingdb
    volumes:
      - /home/docker/librebooking_test/lb1_conf:/config
    environment:
      - LB_INSTALL_PASSWORD=password
      - LB_DATABASE_PASSWORD=password
      - LB_DATABASE_NAME=lb1
      - LB_DATABASE_USER=lb1
      - LB_DATABASE_HOSTSPEC=librebookingdb
      - LB_LOGGING_FOLDER=/var/log/librebooking
      - LB_LOGGING_LEVEL=ERROR
      - LB_LOGGING_SQL=false
      - LB_DEFAULT_TIMEZONE=Europe/Berlin
      - LB_UPLOADS_IMAGE_UPLOAD_URL=Web/uploads/images
      - LB_UPLOADS_RESERVATION_ATTACHMENT_PATH=Web/uploads/reservation

Reason for the issue: the permissions for the host directory lb1_conf do not allow container user www-data to create files in it

Error-2: entrypoint.sh: sed: couldn't open temporary file /etc/apache2/sites-enabled/sedWTruO5: Permission denied

How to reproduce:

  • Start with the directory structure /home/docker/librebooking_test/lb1_test created previously
  • Change the directory permissions with sudo chmod 0777 /home/docker/librebooking_test/lb1_test
  • docker-compose.yml file
services:
  librebookingdb:
    image: linuxserver/mariadb:10.6.13
    restart: always
    volumes:
      - /home/docker/librebooking_test/db_conf:/config
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
      - MYSQL_ROOT_PASSWORD=password

  librebookingweb:
    image: librebooking/librebooking:4.2.0
    restart: always
    depends_on:
      - librebookingdb
    volumes:
      - /home/docker/librebooking_test/lb1_conf:/config
    environment:
      - LB_INSTALL_PASSWORD=password
      - LB_DATABASE_PASSWORD=password
      - LB_DATABASE_NAME=lb1
      - LB_DATABASE_USER=lb1
      - LB_DATABASE_HOSTSPEC=librebookingdb
      - LB_LOGGING_FOLDER=/var/log/librebooking
      - LB_LOGGING_LEVEL=ERROR
      - LB_LOGGING_SQL=false
      - LB_DEFAULT_TIMEZONE=Europe/Berlin
      - LB_UPLOADS_IMAGE_UPLOAD_URL=Web/uploads/images
      - LB_UPLOADS_RESERVATION_ATTACHMENT_PATH=Web/uploads/reservation
      - APP_PATH=mypath

Reason for the issue: container user www-data does not have the permission to change file /etc/apache2/sites-enabled/000-default.conf

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions