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.
You will need to change your Docker run line to read
docker run --user 1005:0 owncloud/server:latest. Because, the Own Cloud startup scripts change permissions on files in/etc/and other root owned files. But, even after I made the change I just suggested, I could not get it to start without error.I was seeing the same error. So, I created the following
Dockerfile, which inherits fromowncloud/server:10.13.1-amd64.It works better, but it still fails to start-up, and I still get the following error at the end of output:
I can see in
overlay/etc/owncloud.d/25-chown.sh, which execute at system startup, permissions are modified on a bunch of directories. However, that script seems to execute without error. The error I'm seeing,seteuid: Operation not permitted, seems to be generated from some other piece of code or a script, not sure which.