November 17, 2019, 11:15:42 pm

News:

Have you visited the Allwinner Chipset wiki? - http://linux-sunxi.org/


Cubieboard2 linaro-alip 3.3.0 socket: Permission denied

Started by jpmathew, July 09, 2013, 11:40:23 am

Previous topic - Next topic

jpmathew

Apologies if this has been reported earlier.
I installed an SD Card with Linaro and booted. The system able to ping or curl with sudo prefix. Without sudo it fails with socket: Permission denied.
Unable to use the browser, as it fails with DNS error.
But I could start firefox with sudo prefix and able to browse.
Appreciate a suggestion for this.
Thanks
Joseph Mathew

patwood

This is a problem (security feature) with android linux kernels.  You need to create an inet group with GID 3003 and add any user that needs network access to this group.  Some possibilities are ntp, www-data, avahi, nobody (for mdnsd), cups, and any other daemon that might open a network socket.

Alternatively, you can use the kernel I mention here (better take the modules too): http://www.cubieforums.com/index.php/topic,440.  It has the "android paranoid network" kernel option turned off.

IvanYeung

Quote from: patwood on July 09, 2013, 11:55:43 am
... You need to create an inet group with GID 3003 and add any user that needs network access to this group.  ...


Just curious how you find it out, I was stuck at this point before when I downloaded images directly online.

For those who use menuconfig to build kernel, the option to uncheck is at . Just don't understand why this option is set in the default config.
Networking support->Networking options->only allow certain groups to create socket

patwood

Quote from: IvanYeung on July 10, 2013, 03:26:45 am
Quote from: patwood on July 09, 2013, 11:55:43 am
... You need to create an inet group with GID 3003 and add any user that needs network access to this group.  ...


Just curious how you find it out, I was stuck at this point before when I downloaded images directly online.

This has always been a problem with android kernels.  I ran across this a year ago with the mk802 at the miniand.com forums.
Quote
For those who use menuconfig to build kernel, the option to uncheck is at . Just don't understand why this option is set in the default config.
Networking support->Networking options->only allow certain groups to create socket

It's a standard android setting, and this kernel is taken directly from the allwinner android source drop.

jpmathew

Thanks Patwood. I tried the fix you gave and it worked perfect.
I am on to the next tests.
Joseph Mathew