简体   繁体   English

RHEL4 / Mono x86_64上的System.UnauthorizedAccessException

[英]System.UnauthorizedAccessException on RHEL4/Mono x86_64

I am using mod_mono 2.4.2.3 and Apache 2 to host a web application. 我正在使用mod_mono 2.4.2.3和Apache 2托管Web应用程序。 This application tries to generate a temp image on its temp folder, but it gives me this error: 此应用程序尝试在其temp文件夹上生成一个临时图像,但它给了我这个错误:

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. 该文件夹具有“ apache”用户/组所有者,该用户配置为运行apache和mod_mono。 I even set 666 permissions for debugging purposes, but it still doesn't work. 我什至设置了666权限用于调试目的,但是它仍然不起作用。

The only catch is that this folder is being synchronized with other server via rsync (the web application works fine there). 唯一要注意的是,该文件夹正在通过rsync与其他服务器同步(Web应用程序在此可以正常工作)。 This is the line used: 这是使用的行:

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

Both servers have the same users, uids and groups. 两台服务器具有相同的用户,uid和组。 I don't know what to do anymore :( 我不知道该怎么办了:(

mod-mono-server2, spawned by mod-mono, runs as the wwwrun (or apache ) user. 由mod-mono生成的mod-mono-server2以wwwrun (或apache )用户身份运行。 That folder needs to be writeable for this user (and/or whatever group apache is running under) in order for that application to work. 该文件夹需要对此用户(和/或正在运行的任何组apache)可写,以便该应用程序正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM