> neumann /ubackup # ls -l test
> ls: test: No such file or directory
> neumann /ubackup # su hzoli -c 'echo bad' > test
> zsh: write error: permission denied
> neumann /ubackup # ls -l test
> -rw-r--r-- 1 root root 0 Nov 6 18:52 test
> neumann /ubackup #
It's your root shell that creates the file! The output of the su command
gets redirected, not the output of the echo command.
Ionut
-- Ionut Badulescu - Columbia College '98 E-mail:ib42@columbia.edu Phone: (212)853-7875 Snail mail: 4A4 Wallach Hall Fax: (212)695-5560 1116 Amsterdam Ave PGP key available on request New York, NY 10027 It is better to keep your mouth shut and be thought a fool, than to open it and remove all doubt.