'Special permissions causing issues with Sharegate to sharepoint migration
I am using ShareGate to migrate data from our network drive to our 365 SharePoint sites.
When doing a migration for certain folders I am getting errors that the SharePoint library cannot contain more than 50,000 unique permissions.
We primarily use security groups to add permissions to folders on the network drive but after the years we have had this data a lot of permissions are messed up and don't even allow admin accounts to change them.
To get around them I am using psexec to open powershell as NT Authority\System and run the following command to make Administrator owner of all the files/folders.
takeown /d Y /a /r /f "folder path"
After doing that I use icacls with the following two commands:
icacls "Folder path" /inheritancelevel:e /t /c /q
icacls "Folder path" /grant "username":f /t /c /q
For username I will use an administrator account to reduce issues with sharegate migration.
This has allowed access to all the files/folders within a main folder of a network drive, but after doing so I get errors for the 50k unique permissions.
I believe I've narrowed it down to icacls making every permission unique when I force add the username with full access. I have tried resetting permissions and forcing inherited permissions which will work for the folders and subfolders, but the files will not take the parent permissions and still recreate the permissions that they had before.
I am currently using powershell v2.0 on a windows server 2008 R2. I have ShareGate version 16.0.0
I installed powershell version 5.0 but have to restart the server after hours tonight so it can do the update and install.
Does anyone know how I would be able to make all permissions the same for future folders and also fix the current permissions so none are unique?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
