Erwan David <[email protected]> writes: > Le 13/05/2024 à 14:36, Richmond a écrit : >> I was experimenting, and found this works: >> >> sudo xterm -e "echo 1 > hello" >> >> It created a file owned by root. But I found I was able to remove it >> without being root even though group and world permissions were read >> only. >> >> > thats because sudo exceutes a xterm as root > > then this xterm executes a shell (as root) and this root shell does > the redirection.
Yes, but why did it allow me to delete the file? I was not root then. Try it.

