Can't open files after changing username

I use OS X Mavericks 10.9.4.

I changed my username and this may have caused that I am not able to open any files. I still can see my PDFs and photos in Preview! I get this:

File XYZ couldn’t be opened because you don’t have permission to view it.

I have tried to run Repair Permissions in Disk Utility but that didn't help. I tried manually chmod files but didn't have a permission to do that.

The strangest thing is that I can see my photos in Preview but when I open them I get the error.

The files are not locked. The folder is not locked too and in permissions tab I can see my username "Lukas (Me)" as "Read Write" access.


Make sure that all the permissions are correct on your home folder.
You can use the ACL tool on the Recovery HD to do this:

  1. Boot into the Recovery HD using ⌘R.
  2. Run resetpassword in Terminal (available from Utilities → Terminal).
  3. Select your account from the drop-down list.
  4. Click the Reset button for Reset Home Directory Permissions and ACLs.

I have launched Disk Utility once restarted my computer and then did Repair permissions and it worked.