Page 1 of 1

Windows 7 security problem fix

Posted: Tue Mar 29, 2011 6:14 pm
by NikonWeb
For future reference (hello Google!):

I've just experienced an extremely annoying problem when trying to access a removable hard drive from a new Windows 7 system. Long story short: when trying to open an image file, I got this error message:

"Photo gallery can't open this picture because you do not have permission to access the file location".

I was still able to copy the file(s) to another drive and open them, but browsing thousands of images, this was not a practical solution, to say the least. I was able to set permissions and access a single file at a time, but finding a way to change the ownership and permissions for an entire disk was surprisingly difficult. So, for future reference, here it is: I fixed everything by running the following two commands from an elevated command prompt (i.e. "run as administrator"):

takeown /R /F *

icacls *.* /reset /T /C

This will take ownership and permissions for all folders and files located below the current folder. Just make sure that the root folder (e.g. e:\photos or whatever) has the correct owner and security permissions. The solution - which worked perfectly - is described in more detail here: http://forums.techguy.org/windows-vista ... -need.html

Jarle