469,909 Members | 1,818 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,909 developers. It's quick & easy.

Creating a file programmatically gives wrong file ownership

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
1 1561
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.

Similar topics

3 posts views Thread by Bryan Meyer | last post: by
4 posts views Thread by John Spiegel | last post: by
1 post views Thread by J. Shane Kunkle | last post: by
5 posts views Thread by Brian McClellan | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.