When I'm trying to run owncloud with docker everything is fine. But when I then try to run it as other user I'm always getting the following error:
docker run --user 1005:1005 owncloud/server:latest
/etc/entrypoint.d/05-nsswrapper.sh: line 8: /home/owncloud/passwd: Permission denied
Without the --user 1005:1005
options the container starts properly.
The initial thing I wanted to do is to run owncloud with docker compose and running it as other user so I can have a volume with the data on another disk as the default disk with the operating system on it does not have enough space. I already changed the ownership to a user called owncloud
with uid=gid=1005
I also had a look to the docs of the docker image and also to https://hub.docker.com/_/php/ section Running as an arbitrary user
. But this doesn't work for me. When having a look inside the docker image there is a folder called /home/owncloud
with ownership root
. I'm already running other services with dedicated users and having no such problems.