Mount namespaces, mount propagation, and unbindable mounts
Mount namespaces, mount propagation, and unbindable mounts
Posted Mar 9, 2017 10:33 UTC (Thu) by cortana (subscriber, #24596)In reply to: Mount namespaces, mount propagation, and unbindable mounts by prabhunath
Parent article: Mount namespaces, mount propagation, and unbindable mounts
In one terminal:
$ mkdir /tmp/foo
$ cd /tmp/foo
$ touch bar
$ ls
In a second terminal:
# mount --bind /etc /tmp/foo
In the first terminal, you are still able to interact with the underlying /tmp/foo directory and its contents. Only once you cd out of the mount point does they become inaccessible.
I think you are seeing the same behaviour when you try to mount something over the root directory.