Solved

Remove folder access problem from parent dir -Urgent

Posted on 2013-11-27
5
845 Views
Last Modified: 2014-02-03
$acl= get-acl F:\correct # correct folder permission. 
$files= get-childItem  F:\new\sub 1\sub2\sub 3|set-acl -aclobject $acl 

Open in new window

The code works only if unwanted permission exist only in Sub3 .I need exact same user permission as like  F:\correct for  F:\new\sub 1\sub2\sub . But if any un-needed permission have access to it previous folder,or parent folder, the un-wanted permissions doesn't get removed.

So,kindly help me in fixing this issue.

I need a sample help scripts where it check only required users & their corresponding persmission should exist .If it's finds any un wanted permission then it go to previous level folder and have to remove those permission.
And if the previous sub folder inherit the unwanted permission from parent folder then it should remove those from the parent folder as well.
0
Comment
  • 2
5 Comments
 
LVL 40

Expert Comment

by:Subsun
ID: 39690186
So are you just trying to remove the inherited permission from the folder where you copy the permissions?
0
 
LVL 5

Author Comment

by:VIVEKANANDHAN_PERIASAMY
ID: 39691301
Yes i want to remove the inherited permission apart from set of domain groups.
0
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 39701639
Sorry I missed this alert.. Try..

$acl= get-acl F:\correct # correct folder permission. 
$acl.SetAccessRuleProtection(1,0)
$files= get-childItem  F:\new\sub 1\sub2\sub 3|set-acl -aclobject $acl 

Open in new window

0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
Know what services you can and cannot, should and should not combine on your server.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question