0

我正在使用 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 和组。我不知道该怎么办了:(

4

1 回答 1

0

由 mod-mono 生成的 mod-mono-server2 以wwwrun(或apache)用户身份运行。该文件夹需要对该用户(和/或运行 apache 的任何组)是可写的,才能使该应用程序正常工作。

于 2009-11-12T06:10:12.190 回答