ip forwarding - permission denied
Anders Karlsson
anders at trudheim.com
Fri Apr 1 06:34:41 UTC 2005
On Friday 01 Apr 2005 06:38, david wrote:
> Greetings
Marnin'
> In my quest for a net connected Zaurus I seem to have hit a problem.
> I need to enable ip forwarding with the following command.
>
> sudo echo 1 > /proc/sys/net/ipv4/ip_forward
>
> But all I get is "permission denied" and I don't understand why. Does
> anyone know what I'm missing here?
I have noticed this as well. It would appear that stdout and stderr does
_not_ get elevated privilegies when running a command with sudo. The
command you run (in this case 'echo') runs as root, but stdout is
running as you, hence the permission problems.
I tested this:
anders at tor:~$ touch file
anders at tor:~$ sudo chown root.root file
anders at tor:~$ sudo chmod 0600 file
anders at tor:~$ /usr/bin/sudo echo "1" > ./file
bash: ./file: Permission denied
This illustrates the problem and sudo needs tweaking to do what you (and
I) want it to do. Sorry I could not be of more help than this.
--
Anders Karlsson <anders at trudheim.com> | GnuPG Key ID - 0x4B20601A
Senior QA Engineer - McAfee WebShield | finger anders at lenin.trudheim.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050401/59395b46/attachment.sig>
More information about the ubuntu-users
mailing list