日期:2014-05-17  浏览次数:20951 次

apache模块apr_file_open,permission denied
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);
  }

是为什么啊?


------解决方案--------------------
没有访问这个文件的权限吧/etc/httpd/save.txt
你可以与/home/jason/jason_dir/save.txt对比一下
------解决方案--------------------
chmod 755 /etc/httpd/save.txt