Powershell ACL Take Ownership

%3CLINGO-SUB%20id%3D%22lingo-sub-3038186%22%20slang%3D%22en-US%22%3EPowershell%20ACL%20Take%20Ownership%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3038186%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20an%20issue%20that%20has%20me%20stumped.%26nbsp%3B%20I'm%20working%20on%20a%20large%20group%20of%20files%20that%20have%20incorrect%20owner%20information.%26nbsp%3B%20I%20have%20set%20the%20owner%20to%20the%20proper%20group%20at%20the%20top%20level%2C%20but%20still%20find%20some%20subfolders%20with%20incorrect%20owners.%26nbsp%3B%20If%20I%20try%20to%20run%20get-acl%20on%20the%20folder%20I%20get%20an%20access%20denied%2C%20viewing%20it%20through%20Explorer%20it%20shows%20I%20don't%20have%20read%20access%20and%20cannot%20see%20the%20owner%20or%20permissions.%26nbsp%3B%20When%20I%20take%20ownership%20of%20the%20folder%20through%20windows%20I%20can%20see%20the%20owner%20is%20not%20the%20group%20I%20am%20using%2C%20but%20I%20am%20able%20to%20fix%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I'm%20trying%20to%20use%20set-acl%20on%20the%20folder%20I%20keep%20getting%3A%3C%2FP%3E%3CP%3ESet-Acl%20%3A%20Attempted%20to%20perform%20an%20unauthorized%20operation.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAdditional%20Info%3C%2FP%3E%3CP%3EThe%20files%20reside%20on%20an%20Amazon%20FSX%20UNC%20path.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20anyway%20to%20forcible%20take%20ownership%20of%20these%20folders%20through%20PowerShell%3F%26nbsp%3B%20My%20AD%20account%20has%20the%20ability%20to%20do%20that%20through%20Explorer.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3038186%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

I have an issue that has me stumped.  I'm working on a large group of files that have incorrect owner information.  I have set the owner to the proper group at the top level, but still find some subfolders with incorrect owners.  If I try to run get-acl on the folder I get an access denied, viewing it through Explorer it shows I don't have read access and cannot see the owner or permissions.  When I take ownership of the folder through windows I can see the owner is not the group I am using, but I am able to fix it.

 

When I'm trying to use set-acl on the folder I keep getting:

Set-Acl : Attempted to perform an unauthorized operation.

 

Additional Info

The files reside on an Amazon FSX UNC path.  

 

Is there anyway to forcible take ownership of these folders through PowerShell?  My AD account has the ability to do that through Explorer.  

1 Reply
Don't see anything other than managing Share permissions with PowerShell, nothing that describes setting ACL's with PowerShell on file-level. Report a Support ticket at Amazon?