0

Simple Question: I am the owner of a simple text or binary file. (I created it, so Windows sets the ownership to me)

Now I want the file to forget myself as an owner and set something different as the owner (it is not important what, may be the administrator, another user or everyone).

Is this possible, and is this possible without admin rights?

And of course: How can I code this in VB (NOT in any other language, because I have trouble to translate them [I say this explicitly, because I asked a question yesterday, and I got code in C#, which I weren't able to translate])

T.S.
  • 18,195
  • 11
  • 58
  • 78
Cydhra
  • 581
  • 1
  • 7
  • 17
  • 1
    a regular user cannot "give away" a file. it'd be a trivial way to perform a denial-of-service attack on that other user, by gifting them a file(s) and filling up their allowed disk quota. – Marc B Dec 12 '14 at 21:27
  • 1
    It's not possible to change the owner without admin rights. – ps2goat Dec 12 '14 at 21:28
  • Ok, and how is it possible WITH admin rights? I did not manage to do it with'em either... I've tried it with FileSecurity.SetOwner() but it gave me an InvalidOperationException – Cydhra Dec 12 '14 at 21:52
  • 2
    possible duplicate of [Getting / setting file owner in C#](http://stackoverflow.com/questions/153087/getting-setting-file-owner-in-c-sharp) you really should be able to convert that simple code to VB.net – T.S. Dec 12 '14 at 23:14
  • Ok, thanks, that does not help, but it answers my question... I cannot gift someone the file... The code is exactly what I tried! But thanks anyway! – Cydhra Dec 13 '14 at 13:39

0 Answers0