文件写入权限在Firebreath NP插件中被拒绝
file write permission denied in firebreath npplugin
源代码已经在Fedora 15,16和Ubuntu 10,11,12中进行了测试,没有问题。
但是在 Fedora 17 中,文件写入功能不起作用。
1)
int fd;
if ( 0 < ( fd = open("/home/test/temp/opentest.html", O_CREAT | O_EXCL, 0777))) {
write(fd, "test", strlen("test"));
close(fd);
return "Success";
} else {
return "Error";
}
返回值:错误
2)
FILE *pFile;
pFile = fopen("/home/test/temp/opentest.html", "w+");
if (pFile == NULL) {
return "Pointer is NULL";
} else {
fputs("fopen test", pFile);
fclose(pFile);
return "Success";
}
返回值:"指针为 NULL"
我猜目录的权限出错并设置了 777 权限。但什么都没有改变。
相同的代码在普通的C程序中工作。
为什么它在火息 npPlugin 中不起作用?
许可有什么区别吗?
最有可能的是,该目录不存在,或者您没有写入它的权限。
此命令有效吗?
echo 123 > /home/test/temp/opentest.html
相关文章:
- 从C++本机插件更新Vector3数组
- 使用CMake创建QML插件
- 访问被拒绝后,c++中的故障保护代码
- 停止cmake target_link_libraries将插件中静态库的两个对象文件链接到静态库本身
- 如何创建从Maya(或类似程序)到虚幻引擎的自定义数据导出插件
- IpOpt拒绝解决不受约束的问题
- Termux权限被拒绝
- AWS Lambda C++运行时权限被拒绝
- clang 插件:在编译过程中修改 AST
- 实现动态插件管理器
- 我想通过带有C++和Python的插件创建一个可扩展的应用程序
- Agora.io 虚幻引擎插件构建错误
- WinSock2:connect() 提供"连接被拒绝"
- 为什么 KMS drmModeSetCrtc() 在 X11 会话中运行时会失败并被拒绝权限?
- 使用带有C++对象和标准库容器的插件系统
- 运行命令 "rosbag play example.bag" 时出错。找不到与插件 rosbag/NoEncryptor 对应的库
- 删除目录函数访问被拒绝
- 编译 llvm 插件时出现问题:llvm/Config/llvm-config.h:没有这样的文件或目录
- 模板签名解析为 void(void) 被 GCC 拒绝;这是否有效C++?
- 文件写入权限在Firebreath NP插件中被拒绝