Bug 138

Summary: Unable to append to a file in Korn shell
Product: Sudo Reporter: Phil Freund <pfreund>
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED INVALID    
Severity: normal    
Priority: normal    
Version: 1.6.7   
Hardware: Sun   
OS: Solaris 2.x   

Description Phil Freund 2004-05-12 14:31:57 MDT
While using sudo from the Bourne or Korn shells on Solaris 8 or 9, I am unable
to append to a file.

Example:

sudo echo foo >> foofile
ksh: foofile: cannot create

The target file may already exist or may need to be created by the command;
either way it doesn't work.

If I actually su to root, this works just fine.
Comment 1 Todd C. Miller 2004-05-12 14:34:26 MDT
Redirection is handled by the shell, not sudo.  If you were to do something like 
sudo ksh -c "echo foo >> foofile" it would work.