0

I have a program that creates a socket and waits that someone writes on it, I would like to write with another users but even after changing permissions i cant.

mkfifo -m 777 /tmp/socket

running the code below as root gives

$ echo "hi" > /tmp/socket
bash: /tmp/socket: Permission denied
stat /tmp/socket

File: /tmp/socket
  Size: 0               Blocks: 0          IO Block: 4096   fifo
Device: 0,42    Inode: 95          Links: 1
Access: (0777/prwxrwxrwx)  Uid: ( 1000/   sonic)   Gid: ( 1000/   sonic)
Access: 2023-02-27 15:43:05.237356670 +0100
Modify: 2023-02-27 15:43:05.237356670 +0100
Change: 2023-02-27 15:43:05.237356670 +0100
 Birth: 2023-02-27 15:43:05.237356670 +0100
  • The [accepted answer](https://unix.stackexchange.com/a/691460/108618) to the linked question concentrates on `protected_regular` but it also mentions `protected_fifos` and I think the latter is relevant in your case. – Kamil Maciorowski Feb 27 '23 at 14:54
  • by the way, calling a FIFO "socket" is unnecessarily confusing – it's not a socket. – Marcus Müller Feb 27 '23 at 15:09

0 Answers0