Open reliveyy opened 3 years ago
What is the default setting of this option? What do you suggest as fix: a) simply add hint in docs b) make xud-docker detects this throw a warning
FUSE off
❯ docker run -it --rm -v /:/mnt --entrypoint ls alpine -la /mnt
total 32
drwxr-xr-x 1 root root 240 Nov 15 18:09 .
drwxr-xr-x 1 root root 4096 Nov 16 12:13 ..
drwxr-xr-x 6 root root 192 Sep 29 2019 Users
drwxr-xr-x 4 root root 128 Nov 15 00:37 Volumes
drwxr-xr-x 2 root root 4096 Nov 12 06:48 bin
drwxr-xr-x 11 root root 3160 Nov 15 18:09 dev
drwxr-xr-x 1 root root 220 Nov 15 18:09 etc
drwxr-xr-x 2 root root 4096 Nov 12 06:48 home
lrwxrwxrwx 1 root root 1 Nov 15 18:09 host_mnt -> /
drwxr-xr-x 1 root root 60 Nov 15 18:09 lib
drwxr-xr-x 5 root root 4096 Nov 12 06:48 media
drwxr-xr-x 2 root root 4096 Nov 12 06:48 mnt
drwxr-xr-x 1 root root 60 Nov 15 18:09 opt
drwxr-xr-x 6 root root 192 Nov 10 18:40 private
dr-xr-xr-x 142 root root 0 Nov 15 18:09 proc
drwxr-xr-x 2 root root 4096 Nov 12 06:48 root
drwxr-xr-x 1 root root 180 Nov 15 18:09 run
drwxr-xr-x 2 root root 4096 Nov 12 06:48 sbin
drwxr-xr-x 2 root root 4096 Nov 12 06:48 srv
dr-xr-xr-x 13 root root 0 Nov 15 18:09 sys
drwxrwxrwt 8 root root 256 Nov 16 12:13 tmp
drwxr-xr-x 1 root root 80 Nov 12 06:48 usr
drwxr-xr-x 1 root root 80 Nov 15 18:09 var
FUSE on
❯ docker run -it --rm -v /:/mnt --entrypoint ls alpine -la /mnt
total 32
drwxr-xr-x 1 root root 1380 Nov 16 12:16 .
drwxr-xr-x 1 root root 4096 Nov 16 12:18 ..
lrwxrwxrwx 1 root root 11 Nov 16 12:16 A -> /host_mnt/a
lrwxrwxrwx 1 root root 22 Nov 16 12:16 Applications -> /host_mnt/Applications
lrwxrwxrwx 1 root root 11 Nov 16 12:16 B -> /host_mnt/b
lrwxrwxrwx 1 root root 11 Nov 16 12:16 C -> /host_mnt/c
lrwxrwxrwx 1 root root 11 Nov 16 12:16 D -> /host_mnt/d
lrwxrwxrwx 1 root root 11 Nov 16 12:16 E -> /host_mnt/e
lrwxrwxrwx 1 root root 11 Nov 16 12:16 F -> /host_mnt/f
lrwxrwxrwx 1 root root 11 Nov 16 12:16 G -> /host_mnt/g
lrwxrwxrwx 1 root root 11 Nov 16 12:16 H -> /host_mnt/h
lrwxrwxrwx 1 root root 11 Nov 16 12:16 I -> /host_mnt/i
lrwxrwxrwx 1 root root 11 Nov 16 12:16 J -> /host_mnt/j
lrwxrwxrwx 1 root root 11 Nov 16 12:16 K -> /host_mnt/k
lrwxrwxrwx 1 root root 11 Nov 16 12:16 L -> /host_mnt/l
lrwxrwxrwx 1 root root 17 Nov 16 12:16 Library -> /host_mnt/Library
lrwxrwxrwx 1 root root 11 Nov 16 12:16 M -> /host_mnt/m
lrwxrwxrwx 1 root root 11 Nov 16 12:16 N -> /host_mnt/n
lrwxrwxrwx 1 root root 11 Nov 16 12:16 O -> /host_mnt/o
lrwxrwxrwx 1 root root 11 Nov 16 12:16 P -> /host_mnt/p
lrwxrwxrwx 1 root root 11 Nov 16 12:16 Q -> /host_mnt/q
lrwxrwxrwx 1 root root 11 Nov 16 12:16 R -> /host_mnt/r
lrwxrwxrwx 1 root root 11 Nov 16 12:16 S -> /host_mnt/s
lrwxrwxrwx 1 root root 16 Nov 16 12:16 System -> /host_mnt/System
lrwxrwxrwx 1 root root 11 Nov 16 12:16 T -> /host_mnt/t
lrwxrwxrwx 1 root root 11 Nov 16 12:16 U -> /host_mnt/u
lrwxrwxrwx 1 root root 15 Nov 16 12:16 Users -> /host_mnt/Users
lrwxrwxrwx 1 root root 11 Nov 16 12:16 V -> /host_mnt/v
lrwxrwxrwx 1 root root 17 Nov 16 12:16 Volumes -> /host_mnt/Volumes
lrwxrwxrwx 1 root root 11 Nov 16 12:16 W -> /host_mnt/w
lrwxrwxrwx 1 root root 11 Nov 16 12:16 X -> /host_mnt/x
lrwxrwxrwx 1 root root 11 Nov 16 12:16 Y -> /host_mnt/y
lrwxrwxrwx 1 root root 11 Nov 16 12:16 Z -> /host_mnt/z
lrwxrwxrwx 1 root root 11 Nov 16 12:16 a -> /host_mnt/a
lrwxrwxrwx 1 root root 11 Nov 16 12:16 b -> /host_mnt/b
drwxr-xr-x 2 root root 4096 Nov 16 12:16 bin
lrwxrwxrwx 1 root root 11 Nov 16 12:16 c -> /host_mnt/c
lrwxrwxrwx 1 root root 15 Nov 16 12:16 cores -> /host_mnt/cores
lrwxrwxrwx 1 root root 11 Nov 16 12:16 d -> /host_mnt/d
drwxr-xr-x 11 root root 3160 Nov 16 12:16 dev
lrwxrwxrwx 1 root root 11 Nov 16 12:16 e -> /host_mnt/e
drwxr-xr-x 1 root root 220 Nov 16 12:16 etc
lrwxrwxrwx 1 root root 11 Nov 16 12:16 f -> /host_mnt/f
lrwxrwxrwx 1 root root 11 Nov 16 12:16 g -> /host_mnt/g
lrwxrwxrwx 1 root root 11 Nov 16 12:16 h -> /host_mnt/h
drwxr-xr-x 2 root root 4096 Nov 16 12:16 home
drwxr-xr-x 22 root root 704 Nov 10 18:40 host_mnt
lrwxrwxrwx 1 root root 11 Nov 16 12:16 i -> /host_mnt/i
lrwxrwxrwx 1 root root 11 Nov 16 12:16 j -> /host_mnt/j
lrwxrwxrwx 1 root root 11 Nov 16 12:16 k -> /host_mnt/k
lrwxrwxrwx 1 root root 11 Nov 16 12:16 l -> /host_mnt/l
drwxr-xr-x 1 root root 60 Nov 16 12:16 lib
lrwxrwxrwx 1 root root 11 Nov 16 12:16 m -> /host_mnt/m
drwxr-xr-x 5 root root 4096 Nov 16 12:16 media
drwxr-xr-x 2 root root 4096 Nov 16 12:16 mnt
lrwxrwxrwx 1 root root 11 Nov 16 12:16 n -> /host_mnt/n
lrwxrwxrwx 1 root root 11 Nov 16 12:16 o -> /host_mnt/o
drwxr-xr-x 1 root root 60 Nov 16 12:16 opt
lrwxrwxrwx 1 root root 11 Nov 16 12:16 p -> /host_mnt/p
lrwxrwxrwx 1 root root 17 Nov 16 12:16 private -> /host_mnt/private
dr-xr-xr-x 149 root root 0 Nov 16 12:16 proc
lrwxrwxrwx 1 root root 11 Nov 16 12:16 q -> /host_mnt/q
lrwxrwxrwx 1 root root 11 Nov 16 12:16 r -> /host_mnt/r
drwxr-xr-x 2 root root 4096 Nov 16 12:16 root
drwxr-xr-x 1 root root 180 Nov 16 12:16 run
lrwxrwxrwx 1 root root 11 Nov 16 12:16 s -> /host_mnt/s
drwxr-xr-x 2 root root 4096 Nov 16 12:16 sbin
drwxr-xr-x 2 root root 4096 Nov 16 12:16 srv
dr-xr-xr-x 13 root root 0 Nov 16 12:16 sys
lrwxrwxrwx 1 root root 11 Nov 16 12:16 t -> /host_mnt/t
drwxr-xr-x 1 root root 40 Nov 16 12:18 tmp
lrwxrwxrwx 1 root root 11 Nov 16 12:16 u -> /host_mnt/u
drwxr-xr-x 1 root root 80 Nov 16 12:16 usr
lrwxrwxrwx 1 root root 11 Nov 16 12:16 v -> /host_mnt/v
drwxr-xr-x 1 root root 60 Nov 16 12:16 var
lrwxrwxrwx 1 root root 11 Nov 16 12:16 w -> /host_mnt/w
lrwxrwxrwx 1 root root 11 Nov 16 12:16 x -> /host_mnt/x
lrwxrwxrwx 1 root root 11 Nov 16 12:16 y -> /host_mnt/y
lrwxrwxrwx 1 root root 11 Nov 16 12:16 z -> /host_mnt/z
❯ docker run -it --rm -v /:/mnt --entrypoint ls alpine -la /mnt/host_mnt
total 8
drwxr-xr-x 22 root root 704 Nov 10 18:40 .
drwxr-xr-x 1 root root 1380 Nov 16 12:16 ..
-rw-rw-r-- 1 root root 0 Aug 24 2019 .DS_Store
ls: /mnt/host_mnt/.VolumeIcon.icns: cannot read link: Operation not permitted
lrwxr-xr-x 1 root root 36 Oct 7 2019 .VolumeIcon.icns
---------- 1 root root 0 Aug 24 2019 .file
drwx------ 20 root root 640 Nov 10 18:46 .fseventsd
drwxr-xr-x 2 root root 64 Aug 24 2019 .vol
drwxrwxr-x 66 root root 2112 Nov 16 07:12 Applications
drwxr-xr-x 75 root root 2400 Nov 10 18:43 Library
drwxr-xr-x 8 root root 256 Sep 29 2019 System
drwxr-xr-x 6 root root 192 Sep 29 2019 Users
drwxr-xr-x 4 root root 128 Nov 15 00:37 Volumes
drwxr-xr-x 38 root root 1216 Nov 10 18:40 bin
drwxr-xr-x 2 root root 64 Aug 24 2019 cores
dr-xr-xr-x 3 root root 8115 Nov 15 00:30 dev
ls: /mnt/host_mnt/etc: cannot read link: Operation not permitted
lrwxr-xr-x 1 root root 11 Oct 7 2019 etc
ls: /mnt/host_mnt/home: cannot read link: Operation not permitted
lrwxr-xr-x 1 root root 25 Nov 15 00:30 home
drwxr-xr-x 3 root root 96 Nov 12 07:47 opt
drwxr-xr-x 6 root root 192 Nov 10 18:40 private
drwxr-xr-x 63 root root 2016 Nov 10 18:40 sbin
lrwxr-xr-x 1 root root 11 Oct 7 2019 tmp -> private/tmp
drwxr-xr-x 11 root root 352 Oct 7 2019 usr
ls: /mnt/host_mnt/var: cannot read link: Operation not permitted
lrwxr-xr-x 1 root root 11 Oct 7 2019 var
There is one option called "Use gRPC FUSE for file sharing" in macOS Docker desktop "General" settings page.
If you turn it on, then the macOS rootfs will be mounted inside
/mnt/hostfs/host_mnt
which will break all file checking logic inside xud-docker.