2

I've set up an LFS system and I must have missed a step somewhere. I can only resolve hostnames if I am root:

$ host 6thstreetradio.org
net.c:150: socket() failed: Permission denied
net.c:150: socket() failed: Permission denied
host: can't find either v4 or v6 networking
$ sudo host 6thstreetradio.org
Password: 
6thstreetradio.org has address 67.246.2.103
6thstreetradio.org mail is handled by 5 6thstreetradio.org.

!? Am I missing a permission somewhere in the proc filesystem? Something else? Google searches is turning up nothing, but I'm probably searching for the wrong thing. The code reference in net.c is failing on simple socket creation:

s = socket(domain, SOCK_STREAM, 0);

Any clues?

1 Answer 1

3
+50

Did you set the flag "CONFIG_ANDROID_PARANOID_NETWORK"? You can check the details here : serverfault.com. If so, please try this:

groupadd -g 3003 aid_inet
usermod -G -a aid_inet $YOUR-USER

Also please check the permission of binary files and the config files.

5
  • I think you got it: $ sch-i405_kernel>grep PARANOID .config CONFIG_ANDROID_PARANOID_NETWORK=y # CONFIG_MMC_PARANOID_SD_INIT is not set Aug 24, 2016 at 13:22
  • The usermod thing didn't work, but that's not surprising since this is a linux subsystem running on android. I'll try rebuilding the kernel and see if that works. Aug 24, 2016 at 13:26
  • 2
    YAY! CORRECTION: I forgot to do newgrp aid_inet as by user after adding the group. It must be a magic name recognized by the kernel. After doing that, the normal user as access to the network. Checkmark applied. Aug 24, 2016 at 13:53
  • @DavidDombrowsky Thumbs UP for you! :)
    – neohope
    Aug 25, 2016 at 2:21
  • I ran into almost the same problem with a Linux system on Android, although the group now seems to be called android_inet and I also had to make /etc/resolv.conf readable.
    – jdonald
    Nov 25, 2018 at 4:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.