apache模块apr_file_open,permission denied

woods2001 2010-08-16 09:38:11
apr_file_t *fd = NULL;
apr_status_t rc;
//const char *fspec = "/home/jason/jason_dir/save.txt";
const char *fspec = "/etc/httpd/save.txt";

rc = apr_file_open(&fd, fspec, APR_READ | APR_WRITE | APR_CREATE,
APR_OS_DEFAULT, p);
if (rc != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_WARNING, rc, s,
"mod_proxy_html: unable to open(%s, read | write | create), skipping", fspec);
}

是为什么啊?
...全文
131 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
icy_csdn 2010-08-18
  • 打赏
  • 举报
回复
chmod 755 /etc/httpd/save.txt
woods2001 2010-08-18
  • 打赏
  • 举报
回复
两个都不允许访问
icy_csdn 2010-08-17
  • 打赏
  • 举报
回复
没有访问这个文件的权限吧/etc/httpd/save.txt
你可以与/home/jason/jason_dir/save.txt对比一下

24,923

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Apache
社区管理员
  • Apache
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧