I got the following error this morning trying to restore a SQL Server backup file:
Additional information: System.Data.SqlClient.SqlError: The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'c:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\[my database name].mdf'. (Microsoft.SqlServer.Express.Smo)
And a little bit of Googling brought me to a page which set me straight; it turns out SQL Server was trying to put the files into the wrong directory. You can read more about it here, in the original post where I found the info.