Use this guide when a command or service reports Failed to connect stdout to the journal socket, ignoring: Permission denied or Failed to create stream fd: Permission denied.


Before you begin: You need console or SSH access with sudo privileges. Restarting the journal socket briefly interrupts logging.


Check the socket permissions

stat -c "%a %U %G" /run/systemd/journal/stdout

The expected Ubuntu result is 666 root root.


Restore the journal socket

sudo systemctl restart systemd-journald.socket

This recreates the socket using the unit’s configured SocketMode=0666.


Verify the repair

stat -c "%a %U %G" /run/systemd/journal/stdout
systemctl is-active systemd-journald.socket

Expected output: 666 root root and active. Then retry the affected command or service.


Do not use chmod as the permanent fix - chmod 666 /run/systemd/journal/stdout can confirm a permissions problem, but it is temporary because /run is rebuilt at boot. Restart systemd-journald.socket instead.


If the error continues

systemctl status systemd-journald systemd-journald.socket --no-pager
ls -ld /run/systemd /run/systemd/journal
ls -l /run/systemd/journal/stdout
journalctl -b -u systemd-journald --no-pager -n 100



If you require assistance, feel free to submit a support ticket at our helpdesk here: Submit a ticket | BinaryLane