Windows ACLs with AWS Storage Gateway

0

We are currently using AWS Storage Gateway to get an on-prem SMB mount from an S3 bucket. We have the Storage Gateway running as an on-prem VM and AD-joind and access the SMB share from Windows 10 devices. The problem we are currently facing, is setting the Windows ACLs via Powershell. I'm mounting the SMB share on my local Windows client, and then try to Windows ACLs via Powershell, but it seems nearly impossible to get things working. I can successfully set permissions via Powershell on a folder (or file), but as soon as I want to inherit permissions or reset ACLs from subfolders(and the files in the subfolders), it doesn't work.

My question: Is there anybody with experience/knowledge of setting Windows ACLs programmatically to an SMB mount of the on-prem AWS Storage Gateway? There were already to many hours of work running into nearly nothing...

Thanks and regards!

질문됨 2년 전255회 조회
1개 답변
0

Hello,

As you may already aware, to set new Windows access rules using PowerShell, you would need to get the ACL for specified folder/file using Get-Acl and then use Set-Acl.

There doesn't seem to be a native PowerShell command to manage Inheritance and Propagation. You would want to use preserveInheritance and isProtected .NET class parameters to manage permissions with the inheritance. here is an example. Further, you can use these .NET methods 1 and 2 to manage the Container, Object Inheritance and propagation. For example, $inheritpermissions = [system.security.accesscontrol.InheritanceFlags]"ContainerInherit".

To reset the ACLs, you can add your user to admin user list on the SMB file share. Then, with that user, you can take ownership of the file/folder using SetOwner and then change the permissions. You may also look into using takeown command.

profile pictureAWS
Surya
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인