【发布时间】:2009-10-28 12:48:44
【问题描述】:
我正在使用 mod_mono 2.4.2.3 和 Apache 2 来托管 Web 应用程序。此应用程序尝试在其临时文件夹上生成临时图像,但它给了我这个错误:
System.UnauthorizedAccessException: Access to the path "/opt/franquia/hlrgw/Frontend/tmp/ctl00_ContentPlaceHolder1_ZedGraphWeb1f3c01ca1-bb4f-4b5b-9063-eebf0bb3281b.png" is denied. at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare) at ZedGraph.Web.ZedGraphWeb.Render (System.Web.UI.HtmlTextWriter output) [0x00000]
此文件夹具有“apache”用户/组所有者,即配置为运行 apache 和 mod_mono 的同一用户。我什至设置了 666 权限用于调试目的,但它仍然不起作用。
唯一的问题是这个文件夹正在通过 rsync 与其他服务器同步(Web 应用程序在那里工作正常)。这是使用的行:
*/5 * * * * rsync -vuatpog --delete root@rtclp02:/opt/franquia/hlrgw /opt/franquia/
两台服务器具有相同的用户、uid 和组。我不知道该怎么办了:(
【问题讨论】:
-
我曾经了解到,apache 只喜欢那些可以列出+读取父文件夹的文件夹。意味着如果你有 /foo/bar/fu 并且 'fu' 是 apache 访问的文件夹,它还希望能够读取和列出 'foo' 和 'bar'。
标签: linux mono permissions mod-mono