mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-29 10:10:19 +00:00
nextcloud: Fix install failure due to PrivateTmp=yes
Fixes: #2463. - When FreedomBox service is run via systemd and if the unit has PrivateTmp=yes as was recently introduced, then 'podman exec --user www-data' fails with error 'Error: unable to find user www-data: no matching entries in passwd file'. - The problem seems isolated to this specific instance and does not seem to effect the container start up (which happens via systemd). Tests: - Without the patch, start FreedomBox service via systemd and install Nextcloud. It fails. - With the patch, install succeeds and functional tests for Nextcloud succeed. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
7e2b365bac
commit
4bde5309c5
@ -20,6 +20,7 @@ SERVICE_NAME = 'nextcloud-freedombox'
|
|||||||
VOLUME_NAME = 'nextcloud-freedombox'
|
VOLUME_NAME = 'nextcloud-freedombox'
|
||||||
IMAGE_NAME = 'docker.io/library/nextcloud:stable-fpm'
|
IMAGE_NAME = 'docker.io/library/nextcloud:stable-fpm'
|
||||||
|
|
||||||
|
WWW_DATA_UID = '33'
|
||||||
DB_HOST = 'localhost'
|
DB_HOST = 'localhost'
|
||||||
DB_NAME = 'nextcloud_fbx'
|
DB_NAME = 'nextcloud_fbx'
|
||||||
DB_USER = 'nextcloud_fbx'
|
DB_USER = 'nextcloud_fbx'
|
||||||
@ -76,7 +77,7 @@ def _run_in_container(
|
|||||||
env: dict[str, str] | None = None) -> subprocess.CompletedProcess:
|
env: dict[str, str] | None = None) -> subprocess.CompletedProcess:
|
||||||
"""Run a command inside the container."""
|
"""Run a command inside the container."""
|
||||||
env_args = [f'--env={key}={value}' for key, value in (env or {}).items()]
|
env_args = [f'--env={key}={value}' for key, value in (env or {}).items()]
|
||||||
command = ['podman', 'exec', '--user', 'www-data'
|
command = ['podman', 'exec', '--user', WWW_DATA_UID
|
||||||
] + env_args + [CONTAINER_NAME] + list(args)
|
] + env_args + [CONTAINER_NAME] + list(args)
|
||||||
return subprocess.run(command, capture_output=capture_output, check=check)
|
return subprocess.run(command, capture_output=capture_output, check=check)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user