Bug 138 - Unable to append to a file in Korn shell
Unable to append to a file in Korn shell
Status: RESOLVED INVALID
Product: Sudo
Classification: Unclassified
Component: Sudo
1.6.7
Sun Solaris 2.x
: normal normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-05-12 14:31 MDT by Phil Freund
Modified: 2004-05-12 18:34 MDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.