MSInfluentials
A new blog site for influential people

Show the Owner of a File

In my most recent article in TechNet Magazine I wrote:

Unfortunately, icacls.exe can’t show you the owner of an object. There is no way to actually see, from the command line, who the owner of an object is. Furthermore, if you save the ACL for an object, it does not save the owner of the object.

As an author, I really hate it when, no matter how many times I seem to edit things, a statement that is unclear still slips through unchecked. The statement, as written, seems to indicate that there are no command line tools, in the universe of command line tools, that can show the owner of an object. Not only is that not the case, it wouldn't take more than a few lines of code to produce one. What I, unsuccessfully, was trying to say was this:

Unfortunately, icacls.exe can’t show you the owner of an object. There are, of course, other tools that can do that, including DIR /Q, but it would have been logical for icacls to include the ability to show who the owner of an object is. Furthermore, if you save the ACL for an object, it does not save the owner of the object.

As I said, there is DIR /Q, which is built in. There are also others that can do this:

  • My favorite tool: subinacl /file notepad.exe /display=owner
  • Chad pointed me to fileacl c:\test /owner

There are probably a lot more, but all I really want is for one tool to do it all (with a slightly less obscure syntax than subinacl, and built in).

The book, from which this article is an excerpt, is a bit clearer on this point, but I wish I had thought to clarify it further from the outset. Sorry about the confusion.

Read the complete post at http://msinfluentials.com/blogs/jesper/archive/2007/07/02/show-the-owner-of-a-file.aspx


Posted Mon, Jul 2 2007 6:36 PM by Jesper's Blog

All postings are copyright Jesper M. Johansson or Steve Riley, in the year they were made. These postings are provided "AS IS" with no warranties, and confer no rights. All postings are the sole opinions of Jesper M. Johansson or Steve Riley and do not reflect any official opinion of anyone else with whom the poster(s) are affiliated or has been affiliated in the past. Use of included code samples is permitted for non-commercial use, with no warranties of fitness express or implied. All use of any information or code snippets posted in this blog at the user's sole risk. The blog site would like to thank www.ownwebnow.com and www.exchangedefender.com for their support.
Powered by Community Server (Commercial Edition), by Telligent Systems