I inspected the symlinks in an Ubuntu VM for the namespace related directories under /proc/PID/ns
. I see all the links are in red color.
I even tried to test using unshare
to see if I can create a new namespace. I tested using mount namespace and a new namespace is assigned to the new process.
root@VM:/# ll /proc/$$/ns
total 0
dr-x--x--x 2 root root 0 Apr 21 01:56 ./
dr-xr-xr-x 9 root root 0 Apr 21 01:56 ../
lrwxrwxrwx 1 root root 0 Apr 21 01:56 cgroup -> cgroup:[4026531835]
lrwxrwxrwx 1 root root 0 Apr 21 01:56 ipc -> ipc:[4026531839]
lrwxrwxrwx 1 root root 0 Apr 21 01:56 ** mnt -> mnt:[4026531840] **
lrwxrwxrwx 1 root root 0 Apr 21 01:56 net -> net:[4026531957]
lrwxrwxrwx 1 root root 0 Apr 21 01:56 pid -> pid:[4026531836]
lrwxrwxrwx 1 root root 0 Apr 21 01:56 user -> user:[4026531837]
lrwxrwxrwx 1 root root 0 Apr 21 01:56 uts -> uts:[4026531838]
root@VM:/#
root@VM:/# unshare --mount
root@VM:/#
root@VM:/# ll /proc/$$/ns
total 0
dr-x--x--x 2 root root 0 Apr 21 01:56 ./
dr-xr-xr-x 9 root root 0 Apr 21 01:56 ../
lrwxrwxrwx 1 root root 0 Apr 21 01:56 cgroup -> cgroup:[4026531835]
lrwxrwxrwx 1 root root 0 Apr 21 01:56 ipc -> ipc:[4026531839]
lrwxrwxrwx 1 root root 0 Apr 21 01:56 ** mnt -> mnt:[4026532226] **
lrwxrwxrwx 1 root root 0 Apr 21 01:56 net -> net:[4026531957]
lrwxrwxrwx 1 root root 0 Apr 21 01:56 pid -> pid:[4026531836]
lrwxrwxrwx 1 root root 0 Apr 21 01:56 user -> user:[4026531837]
lrwxrwxrwx 1 root root 0 Apr 21 01:56 uts -> uts:[4026531838]
Can anyone tell why the symlinks are in red ? Does this mean the namespace feature is not working ?