PDA

View Full Version : [ubuntu] Permission denied



viswacse02
May 7th, 2011, 06:03 AM
Hi,

cloud@cloud:~$ sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
[sudo] password for cloud:
cloud@cloud:~$ echo 1 > /proc/sys/net/ipv4/ip_forward
bash: /proc/sys/net/ipv4/ip_forward: Permission denied
cloud@cloud:~$ sudo echo 1 > /proc/sys/net/ipv4/ip_forward
bash: /proc/sys/net/ipv4/ip_forward: Permission denied


What i should do?

mr_luksom
May 7th, 2011, 01:10 PM
What exactly are you trying to do?

You are getting 'permission denied' because you are writing outside of the user cloud's userspace. You could use a suds command, but you can do damage if you are unsure of what you are changing.

I've never had to write anything to proc before, maybe there is another way?

kim0
May 10th, 2011, 01:42 PM
Yeah, make sure you understand what you're doing, other than that use 'sudo -i' to get a root shell, then use your echo commands
Good luck