OS X Network Home Folder Redirection

Network home folder is a nice tool. However, even with a small amount of users, things can slow down quite a bit when there are a lot of read/write activities. Therefore, it’s generally a good idea to redirect the ~/Library/Caches folder to a local folder. This can be easily done by setting up preferences manifest in Workgroup Manager.

1. In Workgroup Manager, click on Preferences on the toolbar, then click on Details.

2. Click on the plus button (+), navigate to /System/Library/CoreServices/ManagedClient.app and add it.

3. You can only apply the settings to one entry at a time (one user or one group), so it makes sense to use a group. With the group selected, select Folder Redirection from the right (preference ID com.apple.MCXRedirector).

4. Select Always, click on the little triangle to the left to expand, and click on New Key. The new key can be one of the three types: Login Redirections, Logout Redirections, or Other Redirections. Select Login Redirections.

5. With the newly created key selected, click on New Key again. The redirection can be one of these four types:

  • deleteAndCreateSymLink: Deletes the target folder in the home folder and creates a local symbolic link in its place.
  • renameAndCreateSymLink: Renames the target folder in the home folder and creates a local symbolic link in its place.
  • deletePath: Deletes the target folder in the home folder.
  • deleteSymLinkAndRestore: Deletes the symbolic link and restores the folder that was renamed by the renameAndCreateSymLink action.

6. There are two ways to set this up. You can either simply delete the caches folder and replaces it with a local symbolic link using the deleteAndCreateSymLink action, or you can rename the Caches folder with a Login Redirection and restore it with a Logout Redirection. I prefer the second option, and here is a screenshot of the setup.

About these ads

17 comments

  1. I can’t seem to find the place to change where networked users cache files in the Mountain Lion Server app. Is there a step by step for this?

  2. Thanks, Tony. I was on the line with Apple and they gave me the link. Also, I tried your preferred method and it didn’t seem to work. (I think I had everything like your screen shot.) So then I tried the alternate that someone else posted in a forum that was also referencing this page…

    https://earth-issues.googlecode.com/issues/attachment?aid=15590002000&name=Cache_redirection.png&token=7V4wm3GrPdXzNJAkzI2SPHNyoi8%3A1389048321171&inline=1

    And this seems to have worked. Thank you for solving this!

      1. What Jon linked shows the exact same step, except that in the part of Login Redirections, instead of renameAndCreateSymLink, he used deleteAndCreateSymLink. It is up to you which one you prefer, but either should work just fine. Although I’ve found that if you use renameAndCreateSymLink, you sometimes end up with multiple Caches folder (Caches, Caches 1, Caches 2, etc.)

      1. Hi Tony,

        I’ve done that, but problems occurred after that; the sym link disappeared, but the original “Caches” folder didn’t get renamed back. Is there a way, so that when a user logs out, the Cache folder is put back to what it was originally

      2. Hi Carmine,

        The Logout Redirection is the one that removes the sym link and put the folder back. I would try re-enabling folder redirection, have the user login and then logout, make sure the Cache folder is there again, then disable folder redirection. If this still doesn’t fix it, then I would try to manually recreate the Cache folder.

  3. Hi Tony,

    Do you know if there is a way of applying folder redirection through profile manager now that WGM will soon be obsolete?

    Thanks

    1. As far as I know you can’t do folder redirection through profile manager. However, I suspect/hope that if they do get rid of WGM in the future, part of its functionalities would get built into Server App.

  4. Hi Tiny,

    How would I apply this to redirecting a users home folder to a file server running windows server 2008. Thank you

    1. The recommended way to do this from Apple is to setup a golden triangle. Your Windows Active Directory being the primary directory server, a Mac server that is bound to your Active Directory but also hosting Open Directory, and your client workstations bound to both the Mac server and Windows server.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s