开发者

System.UnauthorizedAccessException on RHEL4/Mono x86_64

开发者 https://www.devze.com 2022-12-09 20:57 出处:网络
I am using mod_mono 2.4.2.3 and Apache 2 to host a web application. This application tries to generate a temp image on its temp folder, but it gives me this error:

I am using mod_mono 2.4.2.3 and Apache 2 to host a web application. This application tries to generate a temp image on its temp folder, but it gives me this error:

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]

This folder has the "apache" user/group owner, the same user configured to run apache and mod_mono. I even set 666 permissions for debugging purposes, but it still doesn't work.

The only catch is that this folder is being synchronized with other server via rsync (the web application works fine there). This is the line used:

*/5 * * * * rsync  -vuatpog --delete root@rtclp02:/opt/franquia/hlrgw /opt/franquia/

Both servers have the same users, uids and gr开发者_开发技巧oups. I don't know what to do anymore :(


mod-mono-server2, spawned by mod-mono, runs as the wwwrun (or apache) user. That folder needs to be writeable for this user (and/or whatever group apache is running under) in order for that application to work.

0

精彩评论

暂无评论...
验证码 换一张
取 消