File security weirdness createing file.

G

Guest

Hi;

I am creating png files in my ASP .NET app. When I am running under Windows
2003/IIS 6, the file is not given the security permissions it should have. It
does not have any permission for several users that the directory it is in
has, including IUSR_JASMINE (my system is named jasmine).

Here is the weird part. In my aps .net code I have the following:
String jname = Request.PhysicalApplicationPath + "images\\java_" + fileNum +
".txt";
java.io.FileOutputStream fos = new java.io.FileOutputStream(jname);

The above works fine - the created file has the right permissions.

But when my code calls a C# dll that calls a J# dll and that dll uses the
exact same call to new FileOutputStream, I get the vastly reduced set of
permissions.

On XP & IIS 5, this is not a problem.

Any ideas?
 
G

Guest

Make that "creating" file.

One note - both DLLs are strongly named and code signed.

Do I need to put them in the Web.Config file somewhere. Or does IIS 6.0 have
to be told they can create files somewhere?

thanks - dave
 
K

Kevin Yu [MSFT]

Hi dave,

We have reviewed this issue and are currently researching on it. We will
update you ASAP. Thanks for your patience!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
S

Steven Cheng[MSFT]

Hi Dave,

So the context seems a bit complex. Would you try the test by creating two
simplified dlls (c# and J#) ,and both of them only contains the required
file IO operation as in your application to see whether it can reproduce
the problem? If so, we may try performing some local test through the
simplified code ....

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)



--------------------
| Thread-Topic: File security weirdness createing file.
| thread-index: AcYH+BvnYTf0B0VySuysMkpMxRuZvQ==
| X-WBNR-Posting-Host: 199.45.247.98
| From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <[email protected]>
| References: <[email protected]>
| Subject: RE: File security weirdness createing file.
| Date: Fri, 23 Dec 2005 11:36:02 -0800
| Lines: 8
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:366842
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Make that "creating" file.
|
| One note - both DLLs are strongly named and code signed.
|
| Do I need to put them in the Web.Config file somewhere. Or does IIS 6.0
have
| to be told they can create files somewhere?
|
| thanks - dave
|
 
S

Steven Cheng[MSFT]

Thanks for your followup.

Glad that you've figured out the problem and the file api works well...

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| Thread-Topic: File security weirdness createing file.
| thread-index: AcYL/qp5eci/KACJS9mUVIjxWQ+p/Q==
| X-WBNR-Posting-Host: 199.45.247.98
| From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <[email protected]>
| References: <[email protected]>
<[email protected]>
<[email protected]>
| Subject: RE: File security weirdness createing file.
| Date: Wed, 28 Dec 2005 14:33:03 -0800
| Lines: 67
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:367419
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi;
|
| Ok, I found it. The problem is the J# call File.createTempFile().
|
| --
| thanks - dave
|
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi Dave,
| >
| > So the context seems a bit complex. Would you try the test by creating
two
| > simplified dlls (c# and J#) ,and both of them only contains the
required
| > file IO operation as in your application to see whether it can
reproduce
| > the problem? If so, we may try performing some local test through the
| > simplified code ....
| >
| > Regards,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| >
| > --------------------
| > | Thread-Topic: File security weirdness createing file.
| > | thread-index: AcYH+BvnYTf0B0VySuysMkpMxRuZvQ==
| > | X-WBNR-Posting-Host: 199.45.247.98
| > | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <[email protected]>
| > | References: <[email protected]>
| > | Subject: RE: File security weirdness createing file.
| > | Date: Fri, 23 Dec 2005 11:36:02 -0800
| > | Lines: 8
| > | Message-ID: <[email protected]>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:366842
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | Make that "creating" file.
| > |
| > | One note - both DLLs are strongly named and code signed.
| > |
| > | Do I need to put them in the Web.Config file somewhere. Or does IIS
6.0
| > have
| > | to be told they can create files somewhere?
| > |
| > | thanks - dave
| > |
| >
| >
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top