Jump to content

Recommended Posts

Posted

Hi Guys,

 

I would like to copy the permissions of a directory and anything within it to several other directories of the same name located on different machines.

 

I don't want to copy the directory itself, or the contents as they differ between machines. I just want the same permissions. Is this possible as I haven't found anything that seems to do this?

 

Any help would be great.

 

Thanks.

Posted

I've used powershell for this before, not sure how it would handle subfolders but you could probably script it using get-childitem

 

get-acl $folderToGetPermissionsFrom | set-acl $FoldertoSetPermissionsOn

Posted

You could use icacls, it wouldn't allow you to copy and paste permissions but you could certainly create a bat script which will set permissions you want a folder and then set that script to run on all the computers. It is quite a powerful cmd though and I would recommend lots of testing first.

 

If you've never used it before Managing Permissions from the Command Line might be an article worth reading, it's afew years old but will give you an overview of the cmd so you can see if it's suitable.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...