I have a logs folder in my app's folder. I have a .NET 4.0 WCF/REST app running in it on Windows Server 2008 R2. I gave it to Users and IIS_IUSRS and that works but that strikes me as a lot more than necessary.
What user do I need to give create/write permission to? And I have multiple apps and this is the log files for this one app.
I'd not recommend having a log folder beneath your web app's folder. This causes problems and also means these logs are accessible to web clients.
As for the account that needs access -- the web server runs under a windows account as configured in IIS. Regardless of the account configured, IIS injects the group IIS_IUSRS into the token so that that account is in that group. So this group should be
enough to identify the account for writing logs.
david@windwa...
Member
422 Points
138 Posts
What user needs write access to my logs folder?
Apr 02, 2012 10:35 PM|LINK
Hi all;
I have a logs folder in my app's folder. I have a .NET 4.0 WCF/REST app running in it on Windows Server 2008 R2. I gave it to Users and IIS_IUSRS and that works but that strikes me as a lot more than necessary.
What user do I need to give create/write permission to? And I have multiple apps and this is the log files for this one app.
thanks - dave
BrockAllen
All-Star
27532 Points
4906 Posts
MVP
Re: What user needs write access to my logs folder?
Apr 02, 2012 11:05 PM|LINK
I'd not recommend having a log folder beneath your web app's folder. This causes problems and also means these logs are accessible to web clients.
As for the account that needs access -- the web server runs under a windows account as configured in IIS. Regardless of the account configured, IIS injects the group IIS_IUSRS into the token so that that account is in that group. So this group should be enough to identify the account for writing logs.
DevelopMentor | http://www.develop.com
thinktecture | http://www.thinktecture.com/
david@windwa...
Member
422 Points
138 Posts
Re: What user needs write access to my logs folder?
Apr 02, 2012 11:11 PM|LINK
Where is the best place to put the log folder?
thanks - dave
BrockAllen
All-Star
27532 Points
4906 Posts
MVP
Re: What user needs write access to my logs folder?
Apr 02, 2012 11:17 PM|LINK
Well, just outside the directory that holds your web app's code.
DevelopMentor | http://www.develop.com
thinktecture | http://www.thinktecture.com/
david@windwa...
Member
422 Points
138 Posts
Re: What user needs write access to my logs folder?
Apr 03, 2012 04:46 PM|LINK
thanks for all the help!