I know this question has been covered in many contexts but I'm unable to understand and predict when a user added to the sudoers file will not have permission to do something when prepending sudo
to a command.
ubuntu@localhost$ ls -lh
-rw-r--r-- 1 root root 10 Aug 11 11:21 test
ubuntu@localhost$ sudo echo 'something' >> test
-bash: test: Permission denied
ubuntu@localhost$ sudo su
root@localhost# echo 'something' >> test
Why am I denied permission to execute the command sudo echo 'something' >> test
?