A bit new to Docker, trying to figure out how to handle permissions
www-data on the host has uid and gid 33:
user@host:~$ id www-data
uid=33(www-data) gid=33(www-data) groups=33(www-data)
But in the docker container, it is 82:
user@host:~$ docker exec --user www-data nextcloud-0 id
uid=82(www-data) gid=82(www-data) groups=82(www-data).
My ./nextcloud dir is owned by 82:root, as opposed to www-data because there is no user with gid 82 on the host machine, as seen on ls -l.
drwxr-xr-x 15 82 root 4096 Jan 25 09:27 nextcloud
What are the security implications of this? Should I take any measures to fix this? Is it a good idea to run as uid 33 from inside the container instead, and if so, how would I accomplish this?
Here is the nextcloud bit of my docker-compose.yml
nextcloud:
image: nextcloud:fpm-alpine
container_name: nextcloud-0
restart: always
networks:
- web
- nc
depends_on:
- mariadb
- redis
volumes:
- ./nextcloud:/var/www/html
# - ./nextcloud/log:/var/log/nextcloud
- ./mariadb:/var/lib/mysql
- /etc/localtime:/etc/localtime:ro
environment:
- MYSQL_HOST=mariadb
env_file:
- mariadb.env
Thanks to everyone in advance