Docker Community Forums

Share and learn in the Docker community.

All files within bind mounts are considered executable (when using gRPC FUSE for file sharing)

I’m using a bind mount to share files between my running container (using CentOS 8) and the host system (Mac in this case). I discovered that the shell and other apps running inside the container consider all files to be executable regardless of their actual mode. Has anyone else seen this?

Here’s what the mount looks like:

    {
        "Type": "bind",
        "Source": "/host_mnt/Users/dan/src",
        "Destination": "/home/dan/src",
        "Mode": "cached",
        "RW": true,
        "Propagation": "rprivate"
    },

I’ve tried this with and without the “cached” mode. It makes no difference.

Simple example from within Bash:

    ~/src$ touch new_file
    ~/src$ ls -l new_file
    -rw-r--r-- 1 dan root 0 Oct 22 15:24 new_file
    ~/src$ [[ -x new_file ]] && echo executable
    executable

The “os” library in Python also thinks the file is executable.

Note: From the preferences, I disabled gRPC FUSE, and this problem disappeared. Seems it may be related to gRPC FUSE?

BTW, we tried this on Windows and found the same to be true. However, with Docker on Windows, all files appear with the “x” bits set. Trying to “chmod -x” a file has no effect.