By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,649 Members | 1,816 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,649 IT Pros & Developers. It's quick & easy.

File security weirdness createing file.

P: n/a
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?

--
thanks - dave
Dec 23 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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
Dec 23 '05 #2

P: n/a
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."

Dec 24 '05 #3

P: n/a
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==?=" <th*****@nospam.nospam>
| References: <06**********************************@microsoft.co m>
| Subject: RE: File security weirdness createing file.
| Date: Fri, 23 Dec 2005 11:36:02 -0800
| Lines: 8
| Message-ID: <B6**********************************@microsoft.co m>
| 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
|

Dec 26 '05 #4

P: n/a
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==?=" <th*****@nospam.nospam>
| References: <06**********************************@microsoft.co m>
| Subject: RE: File security weirdness createing file.
| Date: Fri, 23 Dec 2005 11:36:02 -0800
| Lines: 8
| Message-ID: <B6**********************************@microsoft.co m>
| 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
|

Dec 28 '05 #5

P: n/a
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==?=" <th*****@nospam.nospam>
| References: <06**********************************@microsoft.co m>
<B6**********************************@microsoft.co m>
<QY**************@TK2MSFTNGXA02.phx.gbl>
| Subject: RE: File security weirdness createing file.
| Date: Wed, 28 Dec 2005 14:33:03 -0800
| Lines: 67
| Message-ID: <81**********************************@microsoft.co m>
| 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!TK2MSFT NGXA03.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==?=" <th*****@nospam.nospam>
| > | References: <06**********************************@microsoft.co m>
| > | Subject: RE: File security weirdness createing file.
| > | Date: Fri, 23 Dec 2005 11:36:02 -0800
| > | Lines: 8
| > | Message-ID: <B6**********************************@microsoft.co m>
| > | 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
| > |
| >
| >
|

Dec 29 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.