You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Ralph Goers (Jira)" <ji...@apache.org> on 2020/04/04 22:29:03 UTC
[jira] [Updated] (LOG4NET-560) UnauthorizedAccessException in
RollingFileAppender when acquiring a mutex
[ https://issues.apache.org/jira/browse/LOG4NET-560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ralph Goers updated LOG4NET-560:
--------------------------------
LOG4NET is now dormant.
> UnauthorizedAccessException in RollingFileAppender when acquiring a mutex
> -------------------------------------------------------------------------
>
> Key: LOG4NET-560
> URL: https://issues.apache.org/jira/browse/LOG4NET-560
> Project: Log4net
> Issue Type: Bug
> Reporter: Erik Källén
> Priority: Major
>
> I have a setup where I want two processes, running as different user accounts to log to the same file.
> I have set up the file permissions so they work, but the second process that starts cannot perform the logging due to this error:
> log4net:ERROR Could not create Appender [myAppender] of type [log4net.Appender.RollingFileAppender]. Reported error follows.
> System.UnauthorizedAccessException: Access to the path 'E__Log_MyLog.log' is denied.
> at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
> at System.Threading.Mutex.MutexTryCodeHelper.MutexTryCode(Object userData)
> at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
> at System.Threading.Mutex.CreateMutexWithGuaranteedCleanup(Boolean initiallyOwned, String name, Boolean& createdNew, SECURITY_ATTRIBUTES secAttrs)
> at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name, Boolean& createdNew, MutexSecurity mutexSecurity)
> at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
> at log4net.Appender.RollingFileAppender.ActivateOptions()
> at log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseAppender(XmlElement appenderElement)
> I think the mutex should be created with access for Everyone, and that would solve the problem.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)