Unix sockets — processes talking through a file
cheat sheet · Ubuntu 24.04 · iproute2 6.1 · nginx 1.24 https://lab.dimsanych.ru/en/wiki/unix-sockets/Cheat sheet
-
ls -l /run/app/app.socks as the first letter — a socket -
stat -c '%F %a %U:%G' /run/app/app.socktype, mode, owner -
ss -xllistening unix sockets -
sudo ss -xlp | grep app.sockwhich process listens -
sudo find /run -type ssockets under /run -
curl --unix-socket /run/app/app.sock http://localhost/HTTP over it -
nc -U /run/app/app.socka raw connection -
sudo chgrp www-data /run/app/app.sockaccess for nginx's group -
sudo chmod 660 /run/app/app.sock