I am doing a simple test on user namespace on Ubuntu 16.04 as shown below.
root@PC:/#
root@PC:/# unshare --user --map-root-user
mesg: change /dev/pts/2 mode failed: Operation not permitted
root@PC:/#
I want to ask if anyone knows why the error "change /dev/pts/2 mode failed: Operation not permitted" occurs. I checked online and found this answer, but my filesystem does not have any ~/.bash_profile
file.
~/.bashrc
(or/etc/bash.bashrc
). It's clear thatmesg
is called from some initialization script. I bet that you won't see any such message if you run it asunshare --user --map-root-user bash --norc
. – May 20 '19 at 11:44unshare --user --map-root-user bash --norc
– Jake May 20 '19 at 21:05