0 votes

I am having an issue with home folder moves between servers. When I move a folder between servers, using Adaxes, the user permissions are lost. I know that this is expected behavior when you move a folder between servers. However, is there an automated way to re-assign the user permissions so they can access their home folder again :?:

by (380 points)

1 Answer

0 votes
by (216k points)
selected by
Best answer

Hello,

It is expected behavior not only when you move home folders between servers, but also when you move a home folder from one share to another within the same server. As a workaround, we can suggest adding one more action to your Business Rule that moves home folders. The action will automatically grant Full Access permissions to a user for his/her home folder after the folder move.

For information on how to add an action to a Business Rule, see steps 5 and 6 of the following help article: http://www.adaxes.com/help/?ManageBusin ... tions.html. You'll need to:

  1. Add the Run a program or PowerShell script action.

  2. Paste the following script in the Script field:

     # Get home directory folder
     try
     {
         $homeFolder = $Context.TargetObject.Get("homeDirectory")
     }
     catch
     {
         $Context.LogMessage("The user does not have a home directory.", "Warning") # TODO: modify me
         return
     }
    
     # Get the user's SID
     $userSidBinary = $Context.TargetObject.Get("objectSid")
     $userSid = New-Object System.Security.Principal.SecurityIdentifier($userSidBinary, 0)
    
     # Grant Full Access to the user for the home folder
     $homeFolderACL = Get-Acl $homeFolder
     $acl = New-Object System.Security.AccessControl.FileSystemAccessRule($userSid,"FullControl","ContainerInherit,ObjectInherit","None","Allow")
     $homeFolderACL.AddAccessRule($acl)
    
     Set-Acl -path $homeFolder $homeFolderACL
    
  3. Enter a short description for the script and click OK.

  4. Save the Business Rule.

0

I ran a few test user directory move operations, and that seemed to fix the issue. Thanks!

Related questions

0 votes
1 answer

I would like to generate a script that would copy the contents of a users home folder to their managers home folder when the deprovisioning script is fired off. ... to managerhomefolder\old users\deprovisionedusername\contents how would I do this in a script?

asked Jun 19, 2012 by gallawayg (40 points)
0 votes
1 answer

Hello Adaxes Support, is there any way you could help me with a script that changes the permissions on a users home folder? I need to remove the permission to delete the folder and add the permission to delete subfolders and files.

asked Aug 1 by dominik.stawny (280 points)
0 votes
1 answer

Good Morning, I've been working through some of my processes and I'm not looking to make sure the deletion of Home directories (both remote and standard) as well as ... for user deletion. If there are any questions or clarification needed, please let me know.

asked Oct 16, 2015 by jtop (700 points)
0 votes
1 answer

Hi folks, I already have a great script (thank you) that monitors our HR system for adds/removes/changes of our staff and reflects those changes in AD via scheduled ... way of doing this? Could I possibly incorporate it into the existing script? Thanks Corey

asked Dec 11, 2014 by ckemp (170 points)
0 votes
1 answer

Hi, I'm new to this forum so I hope this question hasn't already been answered. The sceanrio is that the Adaxes servert is part of domain A and is used to ... , ObjectInherit", "None", "Allow") $acl.AddAccessRule($rule) #Commit Changes Set-Acl $userHome $acl

asked Dec 8, 2014 by niclas.eriksson (260 points)
3,589 questions
3,278 answers
8,303 comments
548,107 users