Database cannot be upgraded because it is read-only or has read-only files. Make the database or files writeable, and rerun recovery
I just found a post that answered this question:

This may not work in all cases, but I was trying to install the Semantic Search Database and got the same error.

You have to run SQL Server Management Studio as an administrator, and it works.