Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permissions when used with docker compose #346

Open
OBoudreaux opened this issue Nov 22, 2024 · 1 comment
Open

Permissions when used with docker compose #346

OBoudreaux opened this issue Nov 22, 2024 · 1 comment

Comments

@OBoudreaux
Copy link

I'm having a heck of a time with permissions when running via a docker-compose file. Setup page loads fine but I get an error that the derbynet directory isn't writable. I have the host data directory at 775 permissions with the same owner and group that the container is run with. I can jump in a console as user 1000 in the container and create files in the directory. Perplexed.

  derbynet:
    image: jeffpiazza/derbynet_server
    container_name: derbynet
    profiles: ["apps", "all"]
    networks:
      - t2_proxy
    environment:
      - PUID=1000
      - PGID=1000
    volumes:
      - $DATADIR/db/derbynet:/var/lib/derbynet
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
    labels:
      - "traefik.enable=true"
      ## HTTP Routers
      - "traefik.http.routers.derbynet-rtr.entrypoints=https"
      - "traefik.http.routers.derbynet-rtr.rule=Host(`$DERBYNET_SUBD.$DOMAINNAME_CLOUD_SERVER`)"
      ## Middlewares
      - "traefik.http.routers.derbynet-rtr.middlewares=chain-authen@file"
     ## HTTP Services
      - "traefik.http.routers.derbynet-rtr.service=derbynet-svc"
      - "traefik.http.services.derbynet-svc.loadbalancer.server.port=80"

@jeffpiazza
Copy link
Owner

I'm afraid I don't have any experience with docker-compose, so can't offer any insights there.

The PHP scripts usually run as user www-data, and the relevant question is whether the directory is writable by that user. (/etc/php/8.2/fpm/pool.d/www.conf sets user and group.) User 1000 may well be more privileged than www-data.

If you're seeing the "The ... directory exists, but isn't writable" message, that's coming from here:

$message = "<p><span class='trouble'>The <b>'".$config_dir."'</b> directory exists, but isn't writable.</span></p>\n";
. You could change this message in your container to include relevant debugging information, if that helped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants