【发布时间】:2016-06-23 23:10:37
【问题描述】:
我可以通过以下方式使用 cURL 命令上传文件,
curl --upload-file 文件名http://example.com/upload/
Web 服务器是 Apache。它已经创建了一个目录“上传”。
但是当我执行以下操作时,它会失败,
curl --upload-file 文件名http://example.com/upload/subdirectory/
cURL报如下错误,
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /upload/subdirectory/file_name
on this server.</p>
<hr>
<address>Apache/2.4.7 (Ubuntu) Server at example.com Port 80</address>
</body></html>
我的要求是让cURL在“上传”下创建一个带有“子目录”的目录,并复制文件“file_name”。
我猜是在 Apache 配置文件中做一些事情。 任何想法。
【问题讨论】: