Docker: bash: /dev/null: Permission denied
3
votes
1
answer
3605
views
I use docker to unpack a linux chroot and then execute commands into it, but I get this inside the chroot.
echo ciao > /dev/null
bash: /dev/null: Permission denied
I thought that the null device must be corrupted so I tried something else:
rm -f /dev/null ; mknod -m 0666 /dev/null c 1 3; echo ciao > /dev/null
bash: /dev/null: Permission denied
But it also did not work.
Doing
stat
on the main /dev/null
and the one inside the chroot showed no difference at all.
I am writing this because it seems I was the first person in the writing about this problem.
Asked by LtWorf
(161 rep)
May 15, 2020, 01:50 PM
Last activity: Jan 16, 2022, 12:01 PM
Last activity: Jan 16, 2022, 12:01 PM