9

Photoshop CS6 gives me the following error:

Could not open a scratch file because the file is locked

my setup has 128gb ssd (C) which contains only my OS files with some junction points to Program Files/Program Files(x86)/ProgramData/Users which are located in my D drive which is a 1TB WD.

At first it showed when I tried to start PS for the first time after a clean install on a new computer I managed to get past it by running PS as admin and changing the scratch disk to D.

But now I noticed that when I try to copy a path from illustrator into Photoshop as either a smart object or as pixels I get this error again. I haven't seen it again other then that but I just started using PS in this setup so I am yet to explore all the functions and whether they are working correctly or not.

When ran as an administrator the illustrator->PS transfer works fine but I don't want to run PS as admin all the time.

Has anyone found a solution for this? I already tried playing with the permissions but it didn't help.

2
  • I'm in the same exact situation (SSD, hardlinks to D etc etc). Any luck? Please take a minute to come back and answer your own question if you have resolved this issue.
    – Tom Auger
    Jan 4, 2013 at 18:07
  • I found a solution for this in the end but it was a few weeks ago so unfortunately I do not remember what were the steps I took. but there's certainly a solution because it worked perfectly ever since. I believe in the end it had something to do with setting the permissions on either the C or D drive. I wish I could offer some more information.
    – Jake
    Jan 5, 2013 at 17:21

4 Answers 4

19

TLDR; Launch Photoshop with CTRL + Alt held down to invoke Scratch Disk selector, or create a "hard link" (junction) to your SDD drive's TEMP directory

Much of these types of issues with Photoshop 13 (CS6) have to do with scratch disk location and writeability. It goes like this: Photoshop looks at your TEMP environment variable to determine where to put its scratch disk. In a vanilla install, this would be pointing to a location inside your %USERDATA% directory, which is at %SYSTEM_ROOT%\Users\YourUser etc. However, and this is where it gets weird, if it cannot find this TEMP directory, or if it resides on a disk OTHER than your boot disk, it abandons that idea and tries to create the scratch file in the root of the system boot disk.

This is where things get ugly, because in a typical Windows 7 installation, the root of the boot disk is locked for most users. This is a Good Thing, and has some security implications if disabled. Nevertheless, one solution that I have seen actually recommended by Adobe support has been to run Photoshop as an administrator. This can be done through the Properties of the Photoshop.exe file. Since I strongly disrecommend this I will not even post any further details about how that can be accomplished, though the steps are very simple.

ANother solution, and the one that was recommended to me by Adobe support seconds before I hung up the phone in disgust, was to open up the access privileges on the boot drive. This is unacceptable and we will speak no more on it.

A very simple option is simply to point your scratch disk space to your large data drive. If you can open up Photoshop, then go to Preferences > Performance and set you D:/ drive as your primary scratch drive. If you have just installed Photoshop, and it errors out on launch, so you can't even access the Preferences, remember that you can invoke the scratch disk chooser by simply holding down CTRL + Alt immediately after clicking the Photoshop icon to launch the application.

Note that while this solves the issue for Photoshop, if you're also running other Creative Suite 6 applications, you will still run into issues with the TEMP directory being relocated. A permanent solution is to manually create a TEMP directory somewhere on your data drive, and then create another junction (hard link) that fools the OS into thinking that the TEMP drive is in fact on your boot C:\ drive. When you do this, you also have to edit your computer's user and system environment variables to point to this new directory (you point them to the link location on your C:\ drive, not your data drive.)

Editing the environment variables is straightforward: type View Advanced System into your start menu search and choose the advanced system settings option in the search results. Click the Advanced tab and then the Environment Variable button. Now look for any occurrence of TEMP or TMP and type in the full path to the hard link you created on your C:\ drive.

For more detailed instructions, see my blog post.

4
  • Pressing CTRL+ALT was great. This is a bad error. Thank you for suggesting it instead of running Photoshop as administrator.
    – krizzo
    Mar 2, 2014 at 2:04
  • 1
    Great answer thankyou very much. This answer needs more upvotes! Dec 15, 2014 at 22:55
  • What ist the actual path of the scratch file(s)? If I know that, wouldn't a targeted Icacls foo*.xyz /T /C /grant everyone:F help?
    – Frank N
    Nov 1, 2016 at 1:47
  • I've tried all of these suggestions and it still gives me the same error. Even when I try running Photoshop as an administrator, I still get the same error. When I try the Ctrl+Alt approach, the only 2 options it gives me for the scratch disk are "Startup" and "C:\". I don't even know where this "Startup" folder/drive would be. Regardless of which option I choose, I still get the same error. I even tried using the "subst" command to create a new fake drive which points to another directory on my computer, and tried to use that as the scratch disk, but I still got the same error! Jun 24, 2019 at 22:35
5

Photoshop => Right Click => Run as administratior

And there you go.

2
  • 1
    to avoid doing the same every time you launch photoshop, see Tom Auger answer, the trick holding Control + Alt after launching photoshop worked like a charm for me!
    – jelies
    Aug 4, 2013 at 19:54
  • This answer simply outrageous. Even if it is helpful, it is getting into a very dangerous habit. Besides, people who own Photoshop legally can't run as admin every time because their account is a standard account. Good thing too.
    – user477799
    Jul 27, 2016 at 15:47
3
  1. Right click on Photoshop
  2. Run as administratior

Else:

  1. Open Photoshop
  2. Edit
  3. Preference
  4. Performance
  5. Set "Scratch Disk" as the disk where the Temp directory is located.

It works for me on Windows 10.

0

i've set the user and system environment variables %TEMP%, %TMP% to point to a cumstom folder (like c:\Temp) and it worked for me

1
  • 1
    That only works if your C: drive is the one you want your primary scratch disk to be on. If your C: drive is a smaller SDD and you want to use a larger D: drive, you need to create a Junction.
    – Tom Auger
    Dec 18, 2014 at 18:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .