AnsweredAssumed Answered

HNAS - Change Owner of VirtualVolume on Windows-Server

Question asked by Roman Feigenwinter on Jul 30, 2014
Latest reply on Jul 30, 2014 by Roman Feigenwinter

Hi there,

 

I have another topic that i cant find a solution right now.

 

We are working on migrating the data from our current FileServer to HNAS. Now we are preparing the Data.

 

We will do the DataMigration via Backup / Restore.

 

I created all VirtualVolumes (180 for one EVS). and did the Restore.

 

Now the Data was restored successfully to the HNAS. No Problems there.

 

But the Folder Permissions werent Restored.

 

I found out, that is due to the fact that a VirtualVolume is created with the Owner ID "0". This is in Windows interpreted as a "Unix User". We normally change that manually to "Domain Admins".

 

But i dont want to click on several hundres ov VVol to change that permission.

 

We tried with Powershell, but failed to some errors.

 

PS C:\Users\mgmbackup> $acl = Get-Acl \\naspcbeapps1\apps_1$\apollo
PS C:\Users\mgmbackup> $acl | FL

Path   : Microsoft.PowerShell.Core\FileSystem::\\naspcbeapps1\apps_1$\apollo
Owner  : O:S-1-77-0-0
Group  : G:S-1-77-1-0
Access : Everyone Allow  17957375
Audit  :
Sddl   : O:S-1-77-0-0G:S-1-77-1-0D:AI(A;;0x11201ff;;;WD)
 
PS C:\Users\mgmbackup> $acl.SetOwner([System.Security.Principal.NTAccount] "Administrators")
PS C:\Users\mgmbackup> $acl | FL

Path   : Microsoft.PowerShell.Core\FileSystem::\\naspcbeapps1\apps_1$\apollo
Owner  : BUILTIN\Administrators
Group  : G:S-1-77-1-0
Access : Everyone Allow  17957375
Audit  :
Sddl   : O:BAG:S-1-77-1-0D:AI(A;;0x11201ff;;;WD)
 
PS C:\Users\mgmbackup> Set-Acl \\naspcbeapps1\apps_1$\apollo $acl
Set-Acl : Attempted to perform an unauthorized operation.
At line:1 char:1
+ Set-Acl \\naspcbeapps1\apps_1$\apollo $acl
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (\\naspcbeapps1\apps_1$\apollo:String) [Set-Acl], UnauthorizedAccessEx
   ception
    + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetAclCommand

 

Someone got another idea on how to change that Folder Permission?

 

Best Regards,

Roman

Outcomes