Saturday, March 24, 2012

Permissions - giving "everyone" full permissions is bad ?

Hi all,
I have developed an ASP.NET application, on my Windows XP using visual studi
o 2003 professional.
Now I want to deploy this app to a windows 2003 web edition server, so my cu
stomers can test the app.
I have prepared a new site on the windows 2003 server, and copied all files
over to this server.
It works perfectly, but when my app tries to create / write to a TXT file, i
t throws an "System.UnauthorizedAccessException" exception. If I test ASPX f
iles which does not try to create a TXT file, I get no exception.
So I go into the properties for the dir where this TXT file is, and adds ASP
NET user and gives it "modify" permissions - no luck!
I then do the same with the "IUSR_<machine>" user - no luck!
Finally, in total desperation, I add the "Everyone" user and gives it FULL a
ccess, and then my ASP.NET application works ...
My question is now :
1) How do I setup the right permissions ? I cannot be true, that I need to a
dd full permissions to the "Everyone" user account ...
Am I missing something here ? Please help me ...
Regards,
Tony Fonager, DenmarkHi Tony:
One of the best ways to debug an issue like this is to turn on
auditing for objects and then get a log of exactly who is being denied
permission.
For some more information see:
http://odetocode.com/Blogs/scott/ar.../06/22/283.aspx
Scott
http://www.OdeToCode.com
On Tue, 13 Jul 2004 12:58:02 -0700, Tony Fonager
<fonager@.newsgroups.nospam> wrote:

>Hi all,
>I have developed an ASP.NET application, on my Windows XP using visual stud
io 2003 professional.
>Now I want to deploy this app to a windows 2003 web edition server, so my c
ustomers can test the app.
>I have prepared a new site on the windows 2003 server, and copied all files
over to this server.
>It works perfectly, but when my app tries to create / write to a TXT file,
it throws an "System.UnauthorizedAccessException" exception. If I test ASPX
files which does not try to create a TXT file, I get no exception.
>So I go into the properties for the dir where this TXT file is, and adds AS
PNET user and gives it "modify" permissions - no luck!
>I then do the same with the "IUSR_<machine>" user - no luck!
>Finally, in total desperation, I add the "Everyone" user and gives it FULL
access, and then my ASP.NET application works ...
>My question is now :
>1) How do I setup the right permissions ? I cannot be true, that I need to
add full permissions to the "Everyone" user account ...
>Am I missing something here ? Please help me ...
>
>Regards,
>Tony Fonager, Denmark
Oh, forgot to mention, I think what you'll find on your 2003 server is
that the NETWORK SERVICE account will be the context trying to write
to the file.
--s
On Tue, 13 Jul 2004 12:58:02 -0700, Tony Fonager
<fonager@.newsgroups.nospam> wrote:

>Hi all,
>I have developed an ASP.NET application, on my Windows XP using visual stud
io 2003 professional.
>Now I want to deploy this app to a windows 2003 web edition server, so my c
ustomers can test the app.
>I have prepared a new site on the windows 2003 server, and copied all files
over to this server.
>It works perfectly, but when my app tries to create / write to a TXT file,
it throws an "System.UnauthorizedAccessException" exception. If I test ASPX
files which does not try to create a TXT file, I get no exception.
>So I go into the properties for the dir where this TXT file is, and adds AS
PNET user and gives it "modify" permissions - no luck!
>I then do the same with the "IUSR_<machine>" user - no luck!
>Finally, in total desperation, I add the "Everyone" user and gives it FULL
access, and then my ASP.NET application works ...
>My question is now :
>1) How do I setup the right permissions ? I cannot be true, that I need to
add full permissions to the "Everyone" user account ...
>Am I missing something here ? Please help me ...
>
>Regards,
>Tony Fonager, Denmark
Scott
http://www.OdeToCode.com
Scott,
That was exactly the account I needed to change permissions for - thanks alo
t, now I can control permissions, and I just tested it with success.
And thanks for at FAST reply :-)
-
Tony Fonager
"Scott Allen" wrote:

> Oh, forgot to mention, I think what you'll find on your 2003 server is
> that the NETWORK SERVICE account will be the context trying to write
> to the file.
> --s
> On Tue, 13 Jul 2004 12:58:02 -0700, Tony Fonager
> <fonager@.newsgroups.nospam> wrote:
>
> --
> Scott
> http://www.OdeToCode.com
>

0 comments:

Post a Comment