mc: <ERROR> Unable to save new mc config. open /.mc/$tmpfile.config.json.2361952386: permission denied.
I know permissions related stuff can be a bit of a rabbit hole so I thought I’d ask here first. The Minio Bitnami image sets up:
ENV HOME="/" USER 1001
The user has no name just UID and GID of 1001. So I’m guessing how Bitnami set up this image’s user and group is conflicting with how Fly.io sets up users in the VM but I thought I’d see if the specific reason is obvious to anyone more in the know here.
Just adding a screenshot of what the directory permissions look like in the container in root and in the /.mc folder. In the /.mc folder the user and group are 1001 root.
I found that this may be a general issue with Bitnami rootless containers. It seems that in a local environment with docker and docker compose, the container does not have a user, just the UID 1001: whoami: cannot find name for user ID 1001, while in the fly vm the user is root.
It’s possible that fly only connects as root with the fly ssh console command, which is how I checked, and that this is a false positive. Seems that the root user is also running the entrypoint commands as well? Or does it respect the Dockerfile user for that?
FROM bitnami/minio:latest
USER root
RUN groupadd --gid 1001 --system minio
RUN useradd --uid 1001 --gid minio --no-create-home --system minio
RUN chown --recursive minio:minio /data
RUN chown --recursive minio:minio /.mc
USER minio