Bug 58 - Clean File
Clean File
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.6.4
HP HP-UX
: normal normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-22 04:05 MST by paulorvj
Modified: 2001-11-22 12:51 MST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description paulorvj 2001-11-22 04:05:34 MST
The following command works correctly in AIX, where in root is owner, but in Hp-
ux the command doesn't work:

sudo echo "" > /file

The error is:  Ksh: Cannot create
Comment 1 Todd C. Miller 2001-11-22 08:51:59 MST
Redirection happens in the shell long before sudo is even executed.  That is why the error message is coming from ksh, _not_ sudo.  If what you want to do is truncate a file with sudo you can use something like 'cp /dev/null file'.