Deletion of open named pipes
来源:互联网 发布:淘宝评价怎么p图 编辑:程序博客网 时间:2024/05/19 07:24
I am creating and opening a named pipe (using mkfifo() ) and the open is blocked (till someone else opens in write mode). However, another process is easily able to delete the pipe file while the first process is blocked on it. Is this behaviour ok? Shouldn't the file be locked because someone else is blocked on it?
if you want to "lock" the file, you can put it in a directory with no write permissions, thereby disabling the ability to delete it.
One of the basic ideas in UNIX is that an open file can be moved or deleted at will. The file/device/FIFO itself will continue to exist, without a name, until it is closed by the last process which has a descriptor on it.
Coming from a Windows background people are used to thinking that a file which is "in use" is somehow protected from certain kinds of operations. Not true on UNIX.
Please note that the named pipe was created with permissions 0400. This means only the owner would have the right to modify/delete it, right
No. Any user can delete any file, providedthey have write permissions on the directory that file is in. It has nothing to do with who owns the file, or the permissions on the file itself.
So, to prevent deletion of the FIFO, make a directory, put the FIFO in this directory, then remove write permissions on the directory.
- Deletion of open named pipes
- Windows named pipes exploitation
- Named pipes permissions
- Named Pipes 连接
- Named Pipes Provider: Could not open a connection to SQL Server [53]
- Named Pipes Provider, error: 40 - Could not open a connection to SQL Server
- SQL SERVER – FIX : ERROR : (provider: Named Pipes Provider, error: 40 – Could not open a connection
- SQL SERVER – FIX : ERROR : (provider: Named Pipes Provider, error: 40 – Could not open a connection
- SQL Server无法以local 登陆问题的解决方法provider: Named Pipes Provider, error: 40 - Could not open a connection
- Named Pipes Provider, error: 40 完全解决方案
- 命名管道(Named Pipes)通信学习
- unix domain socket VS named pipes
- (provider: Named Pipes Provider, error: 40
- Mysql - disable TCP/IP connections and enable named pipes
- 使用 Named Pipes 创建有效的连接字符串
- 使用 Named Pipes 创建有效的连接字符串
- 【三层】问题 — provider:Named Pipes Provider,error:40
- Pipes
- Android应用程序运行的性能设计
- 设置eclipse在新建了一个jsp文件之后将字符编码自动设为utf-8字符编码
- imac的一些基本使用
- Android 访问http实例
- org.springframework.jdbc.BadSqlGrammarException:
- Deletion of open named pipes
- nginx脚本引擎与变量设计
- 英语四级作文模板
- c# 类和对象的区别及联系,对象和变量是一回事吗?有区别吗?
- IIS不能访问,出现The specified module could not be found问题 解决方法
- 总结整理:从B树、B+树、B*树谈到R 树
- 几种序列化之间的比较Thrift&protocolbuffer&avro
- 拦截器Intercepter和过滤器Filter的比较
- 实用嵌入式、android学习教程汇总