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

Missing dependencies for user_external app (External User Support) #495

Open
fritzw opened this issue Dec 5, 2024 · 0 comments
Open

Missing dependencies for user_external app (External User Support) #495

fritzw opened this issue Dec 5, 2024 · 0 comments

Comments

@fritzw
Copy link

fritzw commented Dec 5, 2024

Problem Description

When trying to use the OC_User_IMAP backend (after enabling the "External User Support" app), login attempts for IMAP users fail because the PHP IMAP module is not installed in the owncloud/server docker image. I did not check whether the same is true for OC_User_SMB or OC_User_FTP from the same app, but https://doc.owncloud.com/server/next/admin_manual/configuration/user/user_auth_ftp_smb_imap.html also lists some dependencies there.

The php-imap apt package should be installed in the owncloud server image to make the user_external app (which is included in the image as far as I know) usable out of the box.

Manual Workaround

Until the issue is fixed in the owncloud server docker image, you can temporarily fix the problem by installing the package in the running container and reloading apache2 with the following command on the docker host:

docker exec -it owncloud_server bash -c 'apt update && apt install -y php-imap && killall -HUP apache2'

Automatic Workaround

To perform the mitigation automatically, you can hook into the entrypoint.d infrastructure. First, create a file called 00-install-packages.sh in the same folder as your docker-compose.yml with the following content:

#!/bin/sh -o errexit
apt-get update
apt-get install -y php-imap

Then modify the volumes section of the owncloud service in your docker-compose.yml to mount that file into the folder /etc/entrypoint.d/ inside the container. For my setup, the volumes section looks like this:

    volumes:
      - files:/mnt/data
      - ./00-install-packages.sh:/etc/entrypoint.d/00-install-packages.sh

This will cause the script to be executed and install the php-imap package every time you start the container using docker compose up.

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

1 participant