title: SQL Server 2005 backup restore failing (with folder permissions)
body: <p>I am trying to restore a database (from file <code>thedb.bak</code>). I am using <a href="http://en.wikipedia.org/wiki/SQL_Server_Express" rel="nofollow">SQL Server Express</a> edition 2005 on a Windows 7 Ultimate 64-bit machine.</p>
  
  <p>When I try to restore I get the following error:</p>
  
  <blockquote>
    <p>System.Data.SqlClient.SqlError: The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL.2\MSSQL\Thedb.MDF'. (Microsoft.SqlServer.Express.Smo)</p>
  </blockquote>
  
  <p>My username (antoniocs) is an Administrator. I have edited the permissions in the folder (<code>C:\Program Files (x86)\Microsoft SQL Server\MSSQL.2\MSSQL\</code>) so that the user AntonioCS has full control.</p>
  
  <p>I really need to restore this backup. What am I missing?</p>
  
  <p>Note: I am using the Windows authentication to login. Should I try another user (the one I use is an administrator in the machine)?</p>