I'm running the following command inside a container as an ordinary, non-root user
gcsfuse --foreground --debug_fuse --debug_fs --debug_gcs --debug_http my-bucket /data
and it works locally when I start the container with --priviliged
and that's fine.
But the same doesn't work on Cloud Run (when using the 2nd generation preview execution environment). I get the following error:
2022-05-13 12:08:41.547 CEST gcs: 2022/05/13 10:08:41.546642 Req 0x1: -> ListObjects("") (46.897367ms): OK
2022-05-13 12:08:41.551 CEST /usr/bin/fusermount: failed to open /dev/fuse: Permission denied
2022-05-13 12:08:41.551 CEST mountWithArgs: mountWithConn: Mount: mount: running /usr/bin/fusermount: exit status 1
All other debug log lines, HTTP, GCS, etc. show everything works.
I create my user like this in my Dockerfile
RUN useradd -lmU joe\
&& mkdir -p /data \
&& chown -R joe:joe /data
USER joe
The docs says that I should run gcsfuse as the user who will be using the file system, not as root, but it doesn't work. Any idea what I'm doing wrong?