Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: File search by ownership?

12 Oct 2009   #1
horiz0n

Windows 7 RTM
 
 
File search by ownership?

I recently changed from Win XP to Win 7 and now want to take ownership of files and folders I created with the XP user on an additional partition (right now they are owned by "S-1-5-24-1801374532-421534723-625345543-1003").

Therefor it would be great if I just could search for files by ownership but I haven't found a way to do so. Is that impossible?

TIA, horiz0n


My System SpecsSystem Spec
.
12 Oct 2009   #2
H2SO4

Win7x64
 
 

It's possible but you'd have to script it if you literally wanted only files owned by a particular SID to be affected. I'd have to question whether it's worth the effort, unless you've got a very complex directory structure with lots of intricate permissions settings that you wish to keep.

If it's just data on another partition, why not just blast the whole thing with TAKEOWN?
My System SpecsSystem Spec
12 Oct 2009   #3
Barman58

Windows 10 Pro x64 x2 Windows 10 Enterprise x64, Ubuntu
 
 

In addition to the above you may be able to use a couple of tools in the sysinternals suite which enumerate permissions

have a look at the top two items here ....

File and Disk Utilities: Sysinternals Center, Microsoft TechNet

Not exactly what you require but may allow you to find things that need to be found
My System SpecsSystem Spec
.

12 Oct 2009   #4
horiz0n

Windows 7 RTM
 
 

Thanks for your answer!

Quote   Quote: Originally Posted by H2SO4 View Post
It's possible but you'd have to script it if you literally wanted only files owned by a particular SID to be affected.
So I can let the explorer show me the owner but can't search for it - that's a somehow crippled search function.

Quote   Quote: Originally Posted by H2SO4 View Post
If it's just data on another partition, why not just blast the whole thing with TAKEOWN?
Yeah, that's my plan b - I just wanted to make sure that I don't somehow take ownership of items that the XP user didn't own.

Quote   Quote: Originally Posted by Barman58 View Post
Thanks for the links!
My System SpecsSystem Spec
12 Oct 2009   #5
H2SO4

Win7x64
 
 

Quote   Quote: Originally Posted by horiz0n View Post
So I can let the explorer show me the owner but can't search for it - that's a somehow crippled search function.
I think I understand your point, but technically Explorer doesn't "know" the owner until you go looking for that information. The object owner is part of a structure known as a "security descriptor" (SD) and each file/object on an NTFS partition is associated with an SD. The act of attempting to display a list of files in Explorer causes the security subsystem to first verify that the user in question has rights to those files, but that doesn't by itself return all SD info and all associated permissions... "oh, by the way, here's a list of all the owners for all the files you just listed").

Instead, that "security" tab in file properties queries the SD and file permissions on a deeper level. The script would have to perform that task for each file in turn.

In addition to the utilities which Barman58 suggested, there's a utility called SUBINACL which could possibly do this for you, though the command-line interface is not trivial.
My System SpecsSystem Spec
12 Oct 2009   #6
H2SO4

Win7x64
 
 

Quote   Quote: Originally Posted by H2SO4 View Post
In addition to the utilities which Barman58 suggested, there's a utility called SUBINACL which could possibly do this for you, though the command-line interface is not trivial.
Ah, needless to say, Subinacl.exe can do everything

Download: Download details: SubInACL (SubInACL.exe)

Note the findsid and setowner switches:

Code:
 
W:\Program Files (x86)\Windows Resource Kits\Tools>subinacl /?
SubInAcl version 5.2.3790.1180
USAGE
-----
Usage :
     SubInAcl [/option...] /object_type object_name [[/action[=parameter]...]
 
 /options    :
    /outputlog=FileName                 /errorlog=FileName
    /noverbose                          /verbose (default)
    /notestmode (default)               /testmode
    /alternatesamserver=SamServer       /offlinesam=FileName
    /stringreplaceonoutput=string1=string2
    /expandenvironmentsymbols (default) /noexpandenvironmentsymbols
    /statistic (default)                /nostatistic
    /dumpcachedsids=FileName            /separator=character
    /applyonly=[dacl,sacl,owner,group]
    /nocrossreparsepoint (default)      /crossreparsepoint
 /object_type :
    /service            /keyreg             /subkeyreg
    /file               /subdirectories[=directoriesonly|filesonly]
    /clustershare       /kernelobject       /metabase
    /printer            /onlyfile           /process
    /share              /samobject
 /action      :
    /display[=dacl|sacl|owner|primarygroup|sdsize|sddl] (default)
    /setowner=owner
    /replace=[DomainName\]OldAccount=[DomainName\]New_Account
    /accountmigration=[DomainName\]OldAccount=[DomainName\]New_Account
    /changedomain=OldDomainName=NewDomainName[=MappingFile[=Both]]
    /migratetodomain=SourceDomain=DestDomain=[MappingFile[=Both]]
    /findsid=[DomainName\]Account[=stop|continue]
    /suppresssid=[DomainName\]Account
    /confirm
    /ifchangecontinue
    /cleandeletedsidsfrom=DomainName[=dacl|sacl|owner|primarygroup|all]
    /testmode
    /accesscheck=[DomainName\]Username
    /setprimarygroup=[DomainName\]Group
    /grant=[DomainName\]Username[=Access]
    /deny=[DomainName\]Username[=Access]
    /sgrant=[DomainName\]Username[=Access]
    /sdeny=[DomainName\]Username[=Access]
    /sallowdeny==[DomainName\]Username[=Access]
    /revoke=[DomainName\]Username
    /perm
    /audit
    /compactsecuritydescriptor
    /pathexclude=pattern
    /objectexclude=pattern
    /sddl=sddl_string
    /objectcopysecurity=object_path
    /pathcopysecurity=path_container
Usage  : SubInAcl   [/option...] /playfile file_name
Usage  : SubInAcl   /help [keyword]
         SubInAcl   /help /full
    keyword can be :
    features  usage syntax sids  view_mode test_mode object_type
    domain_migration server_migration substitution_features editing_features
         - or -
    any [/option] [/action] [/object_type]
 
W:\Program Files (x86)\Windows Resource Kits\Tools>
My System SpecsSystem Spec
13 Oct 2009   #7
horiz0n

Windows 7 RTM
 
 

Yet another useful tool, thanks! :-)

Thread can be marked as solved (seems I cannot do it).
My System SpecsSystem Spec
02 Dec 2009   #8
ShadowT

Windows 7
 
 

I know this thread is a month old, but I saw a need to search by owner and created a small utility (which I used to help teach myself C# & .NET as well) to do just that. It allows you to search for files in a given path by username. Unfortunately, it doesn't allow you to search by SID directly at the moment, but it would be really easy to add that into the next version update. It's called File Searcher by Owner and can be downloaded for free at http://www.grimadmin.com/staticpages...php/file-owner.
My System SpecsSystem Spec
10 Jan 2010   #9
HarshaG

Windows 7
 
 
SubinACL in Windows 7

Hi

I am new user for Win7, i am familiar with usage of SubinACL for changing permission to a file/directory/Reg in WinXP. i am expecting same type in Win7 as well,
Initially Subinacl was not present in system32, downloaded .exe. And by using command line mentioned below, i am trying to execute

C:\Windows\System32\subinacl.exe "%ProgramFiles%\<Directoryname>" /grant=BUILTIN\USERS=F

but unable to change permission....can anybody help me how to do it?
My System SpecsSystem Spec
15 Jan 2014   #10
ceseme

Windows 7 enterprise 64 bit
 
 

To search in Windows Explorer by ownership, in the search box type: "owner:yourname" Just be sure that the name you type in is the same as it appears in the column when the owner property box is checked
My System SpecsSystem Spec
Reply

 File search by ownership?




Thread Tools




Similar help and support threads
Thread Forum
Take / Assign Ownership of file / folder
Brink has written an excellent tutorial on this, however, for those of you who prefer to "roll your own": Take Ownership of file - Vista Forums Taking Ownership of Files and Folders As an administrator you can take ownership of a file or folder as follows: 1. In Windows Explorer,...
General Discussion
File Ownership Issues after restoral
HI all, After restoring files from Acronis backup to a freshly installed Windows 7 Professional 64-bit system, I notice there seem to be some ownership issues. Hundreds of documents would now appear to not know they should simply open for the owner of the "my documents" and desktop folders they...
Backup and Restore
Un-take ownership of program data folder so search can work???
I tried to take ownership of ProgramData - a folder in my C drive - to install VMWare because it gave me a security error. Now I can't use Windows Search from the Start Menu, and I think I got an error somewhere related to ProgramData while I tried to fix it. Indexing is not running, according to...
Performance & Maintenance
lost file ownership of computer
hi all, i have been searching the forum for answers and have tried a few things but am seeking help before i do anymore damage to my computer! first, i have a toshiba laptop running windows 7 32bit and made some changes to folder ownership that has wrecked havoc on my machine. i am the only user...
General Discussion
uTorrent,File Ownership & Permissions
Hi there, My user account that I'm logged into is an administrator. I have the Context Menu option "Take ownership" enabled. I also have the "GodMode" folder created. So, why is it that I can't uninstall uTorrent from Programs in the Control Panel? I have taken ownership of the folder that...
Software


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 02:38.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App