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

Creating a file programmatically gives wrong file ownership

P: n/a
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");
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


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

This discussion thread is closed

Replies have been disabled for this discussion.