locked
Moving INETPUB folder from c drive to another partition RRS feed

Answers

  • I dont think there's an easy way to achieve this.  As you enter the physical file location when you create the web application it cannot be "moved".

    You could try extending the web application and entering a new inetpub or directory location at that point.  Once it's happy, delete the original application and subsequently the physical directories.

    http://technet.microsoft.com/en-us/library/cc262668(office.12).aspx

    In a test environment first of course ;-) Interested to know how you get on.


    PT_UK http://redmanta.co.uk/blog Twitter: @redmantauk MCTS:WSS,MOSS,2010 MCITP:2010
    Thursday, November 17, 2011 11:25 AM
  • The more I think about it, you are correct...changing the default directory will not change the web site directory. I was thinking about where the IIS logs are stored.

    The way to fix this is that you have unextend the web application from the Default zone and then extend it again into the Default zone again. Please note that this will delete your current IIS web site on the file system. So I would make sure you have a backup all directories on the file system that make up that web site. If you have customizations that you made to the web.config, etc. manually, they would be lost and you may need a way to look up those settings or get files to restore the site to a working condition. I recommend you test this in a test environment before doing this in production. This will ensure you understand the process and you can verify if you have any settings/files that you will need to restore.

    By just un-extending and extending the web application, you will retain the other settings you have on the web application.

    Instructions for this process can be found on this page. When you go to extend the web application again into the Default zone, you will be able to change the path so you can move the files out of the Inetpub folder on the C: drive. http://technet.microsoft.com/en-us/library/cc298636%28office.12%29.aspx


    JD Wade
    Senior SharePoint Consultant, MCTS
    Horizons Consulting, Inc.
    Blog: http://wadingthrough.com
    Twitter: http://twitter.com/jdwade
    Friday, November 18, 2011 8:27 PM

All replies

  • I believe you have to change the home directory setting at the root of the IIS sites container in order for SharePoint sites to inherit it. This will change the default home directory for any new site that is created in IIS.

    http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/c300f574-c67a-4ecd-a803-2468113bbd17.mspx?mfr=true


    JD Wade
    Senior SharePoint Consultant, MCTS
    Horizons Consulting, Inc.
    Blog: http://wadingthrough.com
    Twitter: http://twitter.com/jdwade
    Wednesday, November 16, 2011 2:20 PM
  • Thank you JD Wade for your reply but in fact the same issue still here, the INETPUB folder creates itself again after restart and the settings return back to point to the INETPUB on c drive

    is there a configuration file which forces the settings to pint to c:\inetpub after restart?

    Thursday, November 17, 2011 10:43 AM
  • I dont think there's an easy way to achieve this.  As you enter the physical file location when you create the web application it cannot be "moved".

    You could try extending the web application and entering a new inetpub or directory location at that point.  Once it's happy, delete the original application and subsequently the physical directories.

    http://technet.microsoft.com/en-us/library/cc262668(office.12).aspx

    In a test environment first of course ;-) Interested to know how you get on.


    PT_UK http://redmanta.co.uk/blog Twitter: @redmantauk MCTS:WSS,MOSS,2010 MCITP:2010
    Thursday, November 17, 2011 11:25 AM
  • The more I think about it, you are correct...changing the default directory will not change the web site directory. I was thinking about where the IIS logs are stored.

    The way to fix this is that you have unextend the web application from the Default zone and then extend it again into the Default zone again. Please note that this will delete your current IIS web site on the file system. So I would make sure you have a backup all directories on the file system that make up that web site. If you have customizations that you made to the web.config, etc. manually, they would be lost and you may need a way to look up those settings or get files to restore the site to a working condition. I recommend you test this in a test environment before doing this in production. This will ensure you understand the process and you can verify if you have any settings/files that you will need to restore.

    By just un-extending and extending the web application, you will retain the other settings you have on the web application.

    Instructions for this process can be found on this page. When you go to extend the web application again into the Default zone, you will be able to change the path so you can move the files out of the Inetpub folder on the C: drive. http://technet.microsoft.com/en-us/library/cc298636%28office.12%29.aspx


    JD Wade
    Senior SharePoint Consultant, MCTS
    Horizons Consulting, Inc.
    Blog: http://wadingthrough.com
    Twitter: http://twitter.com/jdwade
    Friday, November 18, 2011 8:27 PM
  • I think a simpler and less invasive way to achieve this is to remove the WFE role from the server. That will remove all WSS sites from IIS. Later you can add the WFE role back to the server to recreate the websites and files.
    Stefan Goßner
    Senior Escalation Engineer - Microsoft CSS
    This post is provided "AS IS" with no warrenties and confers no rights.
    Friday, November 18, 2011 8:32 PM
  • Stefan,

    I am confused by your comment and I am probably just missing something but wanted to ask. How does removing and re-adding the WFE roles move the INETPUB content from the C: drive to another drive letter? As I understand it, the C:\ drive INETPUB directory information is still going to be stored in the Config database with the C:\Inetpub entry. So when you re-enable the WFE role, I believe the content will still land on the C:\ drive.

    As I said, I am probably missing something so that is why I am asking. Thanks!


    JD Wade
    Senior SharePoint Consultant, MCTS
    Horizons Consulting, Inc.
    Blog: http://wadingthrough.com
    Twitter: http://twitter.com/jdwade
    Friday, November 18, 2011 8:40 PM
  • Hi JD,

    actually it is vice versa! I missed the point in your explanation. So my steps would not address this problem.

    Cheers,
    Stefan


    Stefan Goßner
    Senior Escalation Engineer - Microsoft CSS
    This post is provided "AS IS" with no warrenties and confers no rights.
    Friday, November 18, 2011 8:42 PM
  • We do this, but we've just changed our policies to state that we let SharePoint do what it wants....

    Reasons:

    Updates reset paths back to default
    Harder to maintain with all the extra options needed to be changed
    Over a farm, you may require GPO's to correct settings
    While Microsoft is not known for this, vendors (ie: Add-ons) can refuse support because of a non-standard install.

    All that said, I do not recommend changing the default install. Let it do what it wants to the server and leave it alone. 

    Saturday, November 19, 2011 3:48 AM
  • Just tried this on win 8 x64 worked just fine.

    http://www.domainwebcenter.com/?p=873

    Hope that helps.
    Tuesday, December 4, 2012 3:50 AM
  • Hello all,

    we are facing a problem of moving c:\inetpub to another partition because it is being used by SharePoint 2007 (MOSS 2007); every time we relocate it then it recreates itself again on the c drive and the hosted websites don't run successfully

    we followed the steps with no luck:  

    http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/a59a2665-9078-43ef-8b5a-5bf9bcacc95e.mspx?mfr=true

    please help

    Thanks in advance

    My answer is probably WAY too late, but...

    My Method: Stop www services, stop "WAS" service, and other services which may use inetpub (in your cases all sharepoint related stuff). Take owner of c:\inetpub and correct the rights so you can move it, usually some files in subfolders are owned by "TrustedInstaller" and you cannot move it.

    Then MOVE the directory to i.e. D:

    Get Hardlink Shell Extension from http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html

    Create a JUNCTION from the new inetpub directory to C:\inetpub, by drag-and-drop the inetpub directory to C: drive with the right mouse button, and choose "junction".

    You can create the same Junction with mklink, but Hardlink Shell Extension is nicer.

    Result: For the system inetpub is still on C:, but in reality it is on D: or wherever you moved it.




    • Edited by Setsunaaa Wednesday, September 7, 2016 10:16 AM
    Wednesday, September 7, 2016 9:35 AM