You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Tim Nelson <TN...@epicor.com> on 2011/10/24 13:53:15 UTC

RollingFileAppender log file permissions - Mono

My ASP.Net Web services are running fine and logging on Mono using the RollingFileAppender.  However, right now the log files are being created owned by apache:apache with -rw------- permissions.  I'd like to have log4net generate log files with -rw-r------ (meaning anyone in the apache group could read the file.

Is there a way to do this in log4net?






Notice: This transmission is for the sole use of the intended recipient(s) and may contain information that is confidential and/or privileged. If you are not the intended recipient, please delete this transmission and any attachments and notify the sender by return email immediately. Any unauthorized review, use, disclosure or distribution is prohibited.


This message has been scanned for malware by Websense. www.websense.com

Re: RollingFileAppender log file permissions - Mono

Posted by Stefan Bodewig <bo...@apache.org>.
On 2011-10-24, Tim Nelson wrote:

> My ASP.Net Web services are running fine and logging on Mono using the
> RollingFileAppender.  However, right now the log files are being
> created owned by apache:apache with -rw------- permissions.  I'd like
> to have log4net generate log files with -rw-r------ (meaning anyone in
> the apache group could read the file.

> Is there a way to do this in log4net?

I'm afraid there isn't.

All log4net does is invoking the FileStream-constructor (the four-arg
version) and I don't think the FileShare (which is FileShare.Read by
default) should have any influence on the permissions.  Probably it is
the umask of the apache user that determines them.

Stefan