PC Review


Reply
Thread Tools Rate Thread

Creating a file programmatically gives wrong file ownership

 
 
=?Utf-8?B?U2hhaUg=?=
Guest
Posts: n/a
 
      2nd Nov 2005
When I create a file from a simple command line application written in C# the
file ownership given to the newly created file is of administrators group
although I am running this application in my identity. I would expect that a
created file will get the ownership of the running process identity.

code:

in the Mail I have a single line: File.Create(@"c:\test.txt");
 
Reply With Quote
 
 
 
 
Chris Priede
Guest
Posts: n/a
 
      2nd Nov 2005
Hi,

ShaiH wrote:
> the file ownership given to the newly created file is of
> administrators group although I am running this application
> in my identity. I would expect that a created file will get the
> ownership of the running process identity.


I'd suspect a Windows security setting, which determines whether files
created by anyone in the local Administrators group are given the ownership
of the user account, or of the Administrators group. This may be set
through local security policy or through GPO in a domain environment (for
which it is mainly intended).

--
Chris Priede


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
creating a file extension programmatically =?Utf-8?B?aXdkdTE1?= Microsoft VB .NET 1 21st Oct 2006 12:17 AM
Determining File/Folder ownership WITHOUT taking ownership derek.monaghan@gmail.com Microsoft Windows 2000 Advanced Server 4 13th Apr 2006 09:10 AM
Programmatically creating mde file Peter Microsoft Access 2 2nd Feb 2004 04:21 PM
Programmatically Creating File Shortcuts =?Utf-8?B?dG9tcA==?= Microsoft VB .NET 1 25th Jan 2004 01:46 PM
Creating a .lnk file programmatically John Spiegel Microsoft C# .NET 4 25th Nov 2003 01:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:46 PM.