Why doesn't mkfifo with a mode of 1755 grant read permissions and sticky bit to the user?
6
votes
1
answer
2040
views
I'm creating a server and client situation where i want to create a pipe so they can communicate.
I created the pipe in the server code with
mkfifo("fifo",1755);
:
- 1 for only user that created and root to be able to delete it or rename it,
- 7 for give read, write and exec to user, and
- 5 for both group and other to only give them read and exec.
The problem is that later in the server code I open the fifo to read from it ("fifo",O_RDONLY);
but when i execute it, it shows me an perror that denies me acess to the fifo.
I went to see the permissions of the pipe fifo and it says
p-wx--s--t
so:
- p
stands for pipe,
- -
means the user has no read. I don't know how when I gave it with the 7,
- s
group executes has user. I don't how if i gave 1 so supposedly it should give to user and others the ability to only read and execute and others have t that was expected.
Do I have a misunderstanding of the permissions?
Asked by Joao Parente
(163 rep)
Apr 11, 2019, 10:01 AM
Last activity: Apr 11, 2019, 05:21 PM
Last activity: Apr 11, 2019, 05:21 PM