I am able to mount /top/dir1 directory but not /top/dir1/jack.
These are my user’s properties
%% id -u
12097
%% id -g
1000
And these are the permissions of the two directories:
%% ls -l /top/ /top/dir1
/top/:
total 4
drwxrws--- 13 root jgrp 4096 Dec 5 18:32 dir1
/top/dir1:
total 1
drwxrwsr-x 4 jack jgrp 4096 Nov 29 00:00 jack
When I try to mount /top/dir1/, it works without any issue and inside the docker I am able to see and access directory jack too
docker run --mount type=bind,source=/top/dir1/,target=/home/dir1 --user 12097:1000 -it docker-name:0.1 bash
But it errors out if I try to mount /top/dir1/jack
docker run --mount type=bind,source=/top/dir1/jack/,target=/home/dir1 --user 12097:1000 -it docker-name:0.1 bash
docker: Error response from daemon: invalid mount config for type "bind": stat /top/dir1/jack/: permission denied.
on the prompt where I am trying to run the docker, I am able to do ‘stat /top/dir1/jack’
Any pointers?