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 (360 points)

1 Answer

0 votes
by (215k 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

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 (680 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)
0 votes
1 answer

Hi, I need a script that will retrospectively create a sub-folder on file server's shared folder with following permissions: employee his/hers manager (taken from AD) specific ... for more pre-existing users that don't have them. Thanks for any feedback.

asked Nov 3, 2020 by roberttryba (70 points)
2,740 questions
2,474 answers
6,475 comments
1,372,133 users