I have installed debian jessie on my android phone* using Linux Deploy. Version v0.14.54 is deployed by apt and everything is working fine when I run it either as myself (user ‘android’) or as root.
But when I run it as a separate user ‘syncthing’ which I created as below in preparation to be run as an initd service , I get the following error:
android@localhost:~$ sudo -u syncthing syncthing -no-restart
[3MYC3] 11:27:01 INFO: syncthing v0.14.54 "Dysprosium Dragonfly" (go1.11.1 linux-arm) deb@build.syncthing.net 2018-12-05 11:18:45 UTC [noupgrade]
[3MYC3] 11:27:01 INFO: My ID: 3MYC3YM-6P75O4Z-OLZZ4ZH-KN2CL2S-W52VYW4-IXQ6TWG-OUB6BIN-JKMLPAQ
[3MYC3] 11:27:02 INFO: Single thread SHA256 performance is 11 MB/s using minio/sha256-simd (11 MB/s using crypto/sha256).
[3MYC3] 11:27:02 INFO: Default folder created and/or linked to new config
[3MYC3] 11:27:02 FATAL: get free port (GUI): listen tcp 127.0.0.1:0: socket: permission denied
Hi Audrius, thanks I was hoping you would have some pointers as I have never seen anything like this. There is nothing on the internet either as people only complain about privileged ports.
I’ll do more digging and update if I manage to resolve it.
We try to get a socket on port 0 which usually means get a socket on any port. Perhaps your kernel assumes 0 is a priviledged port. Yet the fact that we are trying to get a socket on port 0 means we failed to get a socket on 8483 which is probably failing with the same error. It seems the user you created is not permitted network access.