I'm getting a whole bunch of permissions errors

1 post / 0 new
qwer777
I'm getting a whole bunch of permissions errors

When i update or install, this happens:

Downloading http://ipkg.nslu2-linux.org/feeds/op...le/Packages.gz
sh: wget: Permission denied
An error ocurred, return value: 1.
Collected errors:
ipkg_download: ERROR: Command failed with return value 127: `wget -q -P /opt/ipkg-gxXvvE http://ipkg.nslu2-linux.org/feeds/op...le/Packages.gz'

I can manually grab the file with wget and install, but I get this:

ipkg install vim_7.3-2_mipsel.ipk
Installing vim (7.3-2) to /opt/...
Configuring screen
//opt/lib/ipkg/info/screen.postinst: line 9: chown: Permission denied
//opt/lib/ipkg/info/screen.postinst: line 10: chmod: Permission denied
postinst script returned status 127
ERROR: screen.postinst returned 127
Configuring vim
sh: rm: Permission denied
Successfully terminated.

From what I can gather, any command called automatically from within another command(like when installing screen chown had a permissions denied error)

also, Im geting "vi: memory exhausted" and 'which somecommand' does nothing

any way I can fix this?