Set and get NTFS file ownership from command line


This tool is deprecated. Use the tool Danger Tools instead.

Usage:
getowner filename
setowner username filename

You might think that this is a topic which is solved in NTFS. You only have to click and take ownership of a file. However I could not do it from the command line. And unfortunately I could not 'click' when I wanted to perform some commands from a PerlIS.dll ISAPI/CGI Perl script using back ticks. And anyway: I needed a command line version.

The result is these two programs:


The program setowner can not really set the owner, this is only take ownership. If you want a real "set owner" program have a look at the program setfile. There is no command line wild char extension.

I used Visual C++ 5.0 to compile.