Friday, October 17, 2008

SharePoint 403 Forbidden Error

During recent migrations we used the database migration method to move SPS 2003 Sites into a MOSS 2007 Farm. The basic process went like this;

  • (SPS 2003 Farm)
  • Prescan
  • Set DB's to read-only
  • Backup DB's
  • Move DB's to MOSS 2007
  • (MOSS 2007 Farm)
  • Restore DB's
  • Attach DB's

Now view your Sites and all works fine right? Not so much, how about a "403 Forbidden" error. Thats always nice! On the SPS 2003 side the sites had been "locked." This can be done through SPSSiteManager.exe or the Central Administration. Either way they were locked.

Once on the MOSS 2007 side all we had to do was "unlock" the sites. The command has changed a little bit and there were a ton of sites, so we opted to script the command that looked something like this;

Here's what I did:

The actual command is;
stsadm.exe -o setsitelock -url -lock

@echoCd\Cd “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN”stsadm.exe -o setsitelock -url http://sharepoint/sites/sitename -lock none
Repeat for Site #2
Repeat for Site #3
etc... etc...
@echo off
pause
exit

-Brian Grabowski

No comments: