Questions tagged [unix-sockets]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
16 views

cannot find screen session I detached from

I am running a program on Unix server and I am mindful that I detached the screen and logged out of the server. Later I ssh'd back in and tried to reattach but I just cannot find my screen. In fact ...
0
votes
0answers
22 views

Connect docker-container with other container by unit-socket

I'am trying to connect to containers by unit-socket/ docker run -d -v /var/lib/docker/overlay/[container_id]/var/run/postgresql/.s.PGSQL.5432:/socket_volume/.s.PGSQL.5432 -p 50000:8080 my_repo/...
0
votes
0answers
33 views

Ssh connection refused due to reach max socket TCP limit

I've a VPS and a lot of device connected to VPS thorugth a reverse ssh tunnel. Lately the vps rejects the connections because it has reached its maximum limit of tcp connections and I read how to ...
1
vote
1answer
53 views

Binding a AF_UNIX to any existing file?

Can we bind a Unix domain socket to any random existing file ? If no, how do you recognize a file that is used by a socket ?
0
votes
0answers
58 views

Unix domain sockets: What is the significance of send-q value in ss utility output for unix domain stream socket?

I am using ss utility to debug a possible message loss (not yet sure) between two applications communicating using unix stream sockets in a linux system. In the below output, app_yyy sends a message ...
2
votes
0answers
77 views

Security issues for passing credentials over a UNIX socket

UNIX sockets often have a mechanism to authenticate their peer processes. However, there is a requirement for care in order to avoid confused deputy attacks. Linux, for example, has two ways to pass ...
0
votes
0answers
22 views

How to read data from one userspace app to another userspace process

From userspace application I read some data using IOCtl from kernel driver synchronously. Now Iam planning to move the driver to userspace. Is there a way for my userspace app to read some data from ...
1
vote
1answer
336 views

Deleting the files from a SFTP server based modified time (SSH not enabled )

Need to delete the files from a sftp remote server based on last modified time .Files which are older then 30 days no need to keep in server .I have tried ls -lt ,but how to copy it to local machine ...
0
votes
1answer
171 views

How can a client talk to another client using unix domain sockets?

Using bash we might have something like this with netcat: nc -lk -U /my/fifo | while read line; do # line => {"client_id":123} done; clients send data like this: echo '{"client_id":123,"data":...
1
vote
1answer
420 views

Sending data to Unix socket failing unless proxied with socat via UDP

I'm trying to debug why data isn't being sent over a Unix Domain Socket. I have 2 applications which should be communicating over a UDS but aren't. To test I've done the following: Using socat, I ...
4
votes
2answers
690 views

Unix Domain Socket bind, reuse address

If I bind() an AF_INET socket (for a TCP connection), then later close() it, next time I run my program, I may have issues, since despite the close(), the kernel can still have the resources ...
0
votes
2answers
72 views

Can one processes have a descriptor that is non-blocking while another process have a descriptor referencing the same file/socket that is blocking?

I am more interested in sockets than regular files, but basically I want to know whether one process can "see" a socket as blocking where another process can see it as non-blocking. I am guessing yes,...
2
votes
2answers
666 views

How many connections can there be between two Unix domain sockets?

From APUE: 17.3 Unique Connections A server can arrange for unique UNIX domain connections to clients using the standard bind, listen, and accept functions. Clients use connect to ...
0
votes
2answers
97 views

Must an application-layer protocol exist for communication between any two programs using sockets?

When any two programs, no matter how simple or complicated, communicate by internet domain sockets (or Unix domain sockets), does it necessarily imply that there is an application-layer protocol ...
0
votes
0answers
763 views

socat - UNIX-LISTEN and TCP-LISTEN in one command

Is it possible, to open a tcp port and a socket with one process/command? socat UNIX-LISTEN:/var/run/mysqld/mysqld.sock,fork,user=mysql,group=mysql,mode=777 TCP:123.123.123.1:3306 combined with: ...
4
votes
1answer
516 views

Forward abstract unix socket over SSH?

I've discovered that OpenSSH is capable of forwarding UNIX sockets like this: ssh -R /var/run/program.sock:/var/run/program.sock My question is whether this extends to abstract unix sockets too. I'...
0
votes
1answer
792 views

Detect unix domain socket deletion?

Assume that you have an application that upon startup creates a unix domain socket and starts listening to it. Then any subsequent instance of the application connects to that socket, passes data to ...
1
vote
1answer
666 views

It is possible to traceroute without touching ICMP?

I often run into a situation where I want to traceroute an IP without root or NET_RAW cap in Linux. I have attempted to send a UDP packet with a small TTL but no ttl error is emitted at all. It seems ...
1
vote
2answers
210 views

Different order for getsockopt SO_PEERCRED in Linux and OpenBSD

I'm trying to get the Unix socket peer credentials in python. I am using this piece of code for that: peercred = conn.getsockopt(socket.SOL_SOCKET, socket.SO_PEERCRED, struct.calcsize("3i")) pid, ...
2
votes
1answer
100 views

Why doesn't `netstat` show Screen client but only Screen server process?

From https://unix.stackexchange.com/a/485290/674 Further down in the netstat output is UNIX sockets: Active UNIX domain sockets (servers and established) Proto RefCnt Flags Type State ...
0
votes
1answer
236 views

syslog-ng modification issue for unix socket

I am having issue researching the right way to go about a problem. The problem is the syslog-ng file in the salt master server at the moment only enforces unix-stream as follows: source s_sys { ...
4
votes
1answer
373 views

How to prevent a process from writing to the systemd journal?

I am using a third party .NET Core application (a binary distribution used by a VS Code extension) that unfortunately has diagnostic logging enabled with no apparent way to disable it (I did already ...
1
vote
1answer
371 views

How to configure systemd so that PHP can use memcached unix socket?

I'm in the process of upgrading from Ubuntu Server 16.04 to 18.04 and at the same time upgrading from PHP 5.6 to PHP 7. In /etc/memcached.conf I added: -s /tmp/memcached.sock -a 666 When I restart ...
1
vote
2answers
803 views

Rsyslog - How to disable udp syslog?

Currently rsyslog is listening on both UDP socket and UNIX socket, as shown below: [root@machine ~]# netstat -ap | grep rsyslog udp 0 0 0.0.0.0:59018 0.0.0.0:* ...
1
vote
0answers
184 views

Total socket count steadily increasing, tcp/udp sockets steady. Why?

I have a server (Ubuntu 16.04.5) running sockets.io and a few other things. This server is running about 5 or 6 different python apps and sockets.io. When the server reaches this level of ~6144 ...
1
vote
1answer
63 views

How to avoid forwarding ports?

I am doing UDP socket programming in C. In order to listen to a port, I need to forward ports in my router. My question is how to avoid doing that and still being able to communicate over the internet,...
1
vote
1answer
2k views

How to create a public unix domain socket?

Consider /var/run/acpid.socket. At any point I can connect to it and disconnect from it. Compare that with nc: $ nc -l -U ./myunixsocket.sock Ncat: bind to ./myunixsocket.sock: Address already in use....
2
votes
1answer
674 views

ss command: difference between raw and unix sockets

The ss command (from the iproute2 set of tools which comes as a newer alternative to netstat) has in its --help the following options -0, --packet display PACKET sockets -t, --tcp ...
1
vote
1answer
212 views

Read GNU screen session without attaching to it

I use GNU screen mostly to run commands that become non-interactive after some initial input. I do not like navigating output in screen sessions, I feel it is a bit buggy. Is there a way to access ...
1
vote
2answers
94 views

Does OpenSSH >=7.2 support local-side tilde expansion for remote Unix socket forwarding

I am trying to forward a gpg-agent Unix socket to a remote machine. I have tried the following two versions of the remote forwarding command: A: ssh -vvv -N -R ~/.gnupg/S.gpg-agent:~/.gnupg/S.gpg-...
0
votes
1answer
1k views

ssh: channel xx: open failed: connect failed: open failed

I'm running ssh running on macOS to redirect connections to local Unix domain socket to a domain socket on another machine. The command line for ssh call is roughly the following: $ ssh -nNT -L /var/...
5
votes
1answer
490 views

How can I sniff unix dgram socket without having file path?

From that article, I realized that: a UNIX domain socket is bound to a file path. So, I need to sniff DGRAM Unix socket through the socat as mentioned here. But when I try to retrieve the path for ...
10
votes
1answer
3k views

What does x (execute) permission do on unix sockets?

By my experience unprivileged user can not access unix socket he/she does not own without x bit set. What does this bit do exactly? Thanks
4
votes
1answer
4k views

SSH connect to a UNIX socket instead of hostname

Short question: How do I connect to a local unix socket (~/test.sock) via ssh? This sockets forwards to an actual ssh server. The obvious does not work and I can't find any documentation: public> ...
2
votes
1answer
519 views

tmux socket api

Is there any way I can control a tmux server and send commands to it like switching to a specific window in a session, or make some queries about the panes through the socket it creates? I've looked ...
1
vote
0answers
241 views

Is there any rsync option to avoid errors on sockets in the source

I'm trying to back up a user's files on a remote machine, but I can't find any rsync option to avoid errors ... ++ rsync -a --no-D --delete --stats '--exclude=.cache/*' --password-file=a_secret ...
1
vote
0answers
81 views

“Multiplex uid mismatch” when trying to get info from Unix socket

I created a unix socket in order to enable SSH multiplexing for my SSH tunnel. I'm new to unix sockets so I wanted to see what this pseudo-file in my filesystem contains. I've tried using: nc -U ...
0
votes
0answers
110 views

Shared buffer for user space processes

Currently Im implementing a shared buffer between user space processes. For that, I have a library which opens a client UNIX socket for the client processes to dump events into the server socket. My ...
1
vote
0answers
151 views

same netlink socket for inter-user space process communication and user space-kernel space communication?

Is it possible to use the same netlink socket for kernel - user space process and witin user space process communication??
1
vote
0answers
781 views

Communication between user space and kernel space - AF_netlink + AF_Unix

I am new to IPC and am trying to implement a common buffer between kernel and user space processes. My design will be in such a way, I will have a library(in user space) where my client socket tries ...
5
votes
1answer
6k views

What values may Linux use for the default unix socket buffer size?

Linux documents the default buffer size for tcp, but not for AF_UNIX ("local") sockets. The value can be read (or written) at runtime. cat /proc/sys/net/core/[rw]mem_default Is this value always ...
1
vote
1answer
378 views

Using Unix domain socket for different hosts

Actually, I have software that runs in the ARM-Linux has three apps of mine.I want to run the one certain application in Linux host x86. The internal components in my ARM-Linux program communicate ...
3
votes
1answer
990 views

Building a Unix socket bridge via TCP

I have two processes (Client and server) that communicate with each other using a Unix socket /tmp/tm.ipc. Both processes (Client and Server) don't support TCP. Client -> /tmp/tm.ipc -> Server Now, ...
0
votes
1answer
952 views

sudo netstat -antp not showing PID

i am testing stuff with sockets and i encountered that strange case : i coded i very simple tcp server in c, i made it block after accept(), just to see what happen when accepting multiple connection ...
0
votes
0answers
452 views

/var/log mounted as a tmpfs failing to get umounted on FreeBSD

I have /var/log mounted as a tmpfs, where log files are synced periodically to the disk by the cron on FreeBSD. The process is done by the rc script. I am mounting it like: mount -t tmpfs -o nosuid,...
4
votes
1answer
640 views

OpenSSH not cleaning up the domain socket upon termination

I have a local unix socket tunneled to another unix socket on a remote instance over SSH: ssh -N -L $HOME/my.sock:/var/run/another.sock however, when I terminate ssh gracefully (i.e. ctrl+C or ...
0
votes
1answer
4k views

Proxying traffic on local unix to a remote unix socket over SSH

I am trying to have a local Unix domain socket, say, ~/docker.sock. I want it to proxy everything to a remote Unix domain socket running elsewhere over SSH. (You can find a diagram of what I’m trying ...
0
votes
0answers
49 views

Opening daemon specific ports

How can we set firewall inbound rules for specific daemon if it is using random port from range of Ephemeral ports? There is Custom Rule wizard available in Windows. Does LINUX and UNIX has similar ...
3
votes
1answer
3k views

nginx errors with failed (13: permission denied) for socket despite socket permissions being set to 777

I've set permissions on the socket to 777 yet Nginx keeps stating that it's being denied permission to access, and yes I've restarted the server. Nginx is being started as root (not the best way but ...
6
votes
1answer
5k views

Can't start applications due to “Maximum number of clients reached” error

After some period of time, I'm experiencing problems with starting applications, for example, Viber. $ /opt/viber/Viber QSqlDatabasePrivate::removeDatabase: connection 'ConfigureDBConnection' is ...