Named pipe to regular file

1k Views Asked by At

Linux: I have opened a named pipe - I can see

prw-rw-rw-  usrA usrA

But after I while, its changed to a regular file

-rw-rw-rw- usrB usrB

Any idea how this can happen? The ownership has changed too. Funny thing is usrA is actually a more privileged user than usrB

1

There are 1 best solutions below

0
On

By renaming, as shown in this example:

mkfifo foo
ls -l foo
touch bar
mv bar foo
ls -l foo

Or this even simpler example:

mkfifo foo
ls -l foo
mv foo bar
touch foo
ls -l foo

Note that renaming is controlled by the permissions set on the containing directory or directories in Unix and Linux, not by the permissions set on the source or destination of the rename.