sudo chroot /tmp/jail /bin/echo 'test' > /home/someone/.bash_history
error log: -bash: /home/someone/.bash_history: Permission denied
Your not running the whole command with sudo. try
sudo sh -c "chroot /tmp/jail /bin/echo 'test' > /home/someone/.bash_history"
The part after the redirect isnt running as root
For more examples
How do I use sudo to redirect output to a location I don't have permission to write to?