473,399 Members | 3,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

File security weirdness createing file.

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
5 1685
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Chuck Amadi | last post by:
Sorry to bovver you again (again) here's script. I still can't see why the get_payload() doesn't produce the plain text message body of an emails in the testwwws users mailbox. As you can see I...
4
by: Cordula's Web | last post by:
Hello, here's a strange bug (?) I've came across (using Python 2.2): # loop_1 for line in file: if some_condition(line): break do_something() # loop_2
15
by: Corne' Cornelius | last post by:
Hi, I'm experiencing some weirdness in a program, when subtracting 2 (double)'s which should result in 0, but instead it returns -1.11022e-16. It looks to me that changing the double x_step...
1
by: (Pete Cresswell) | last post by:
TabControl on the right side of a form with two tabs: Tab #1 contains two subforms that show some dynamic query results. Tab #2 contains a ListView that gets dynamically populated as the user...
9
by: AP | last post by:
Is there anyway to determine what the modified or create date is for a file? In my example I am uploading a text file using the following to select the filename: GetOpenFileName Lib "COMDLG32.DLL"....
2
by: Corne' Cornelius | last post by:
Hi, When you open a file for writing/appending with open() or fopen(), and you have multiple applications that might want to write to the same file at the same time, could that cause weirdness...
3
by: Zamolxe | last post by:
In my application I need to creat a new Access DB file and insert into it some tables bla bla... but, the insertion part is easy the createing of the file is not known so how can I create an...
8
by: ctiggerf | last post by:
I was hopeing someone could help me out here. Been stumped on this one all day. This function 1. Checks uploaded files. 2. Creates two resized images from each (a full size, and a...
1
by: daokfella | last post by:
I have a web usercontrol on which is a Webcontrols.FileUpload control. I expose the PostedFile property as a readonly property of the usercontrol. That way, a page has access to it. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.