PHOTOSHOP - Saving to SMB share on back fails on first try, but when you replace the file it works. (known MacOS bug)

  • 1
  • Problem
  • Updated 3 years ago
  • (Edited)
Any file I want to save to an SMB remote host fails with a zero byte file being created and the following error message:

"Could not save as “file.png” because the file is locked, you do not have necessary access permissions, or another program is using the file. Use the ‘Get Info’ command in the Finder to ensure the file is unlocked and you have permission to access the file. If the problem persists, save the document to a different file or duplicate it in the Finder."

It does not matter which type I save, it will fail on first try. When I re-save and choose to replace the zero byte file, it works.

Always reproducible, never works on first try.
Photo of James

James

  • 5 Posts
  • 0 Reply Likes

Posted 3 years ago

  • 1
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 822 Reply Likes
Which OS version are you using?
That sounds a lot like a MacOS bug that we've seen, and Apple has not yet solved.

The behavior can vary with the type of server used, but the core problem is in the MacOS SMB support.
Photo of James

James

  • 5 Posts
  • 0 Reply Likes
Mac OS X 10.10.5

I would find it weird if it can't be avoided as all other applications are able to save. So if it is an OS X bug, it is a bug with the way photoshops saves. Like maybe photoshop is trying to set an attribute on the file and that attribute isn't compatible with the SMB filesystem. Or maybe photoshop is using an API which is different from what the other programs I use uses. Or it could be that photoshop creates the file then checks if it's there, but because it's networked there is a delay before it's visible?

I am a developer, so I have somewhat of an idea of what could go wrong.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 822 Reply Likes
OK, so you are hitting the known OS bug. We did quite a bit to work around the problem in Photoshop CC 2015, and will be adding some additional workarounds in the next Photoshop release (which we hope will avoid it completely).

Actually, many other applications encounter the problem and fail to save your file. Yes, we tested that.

Photoshop is using the APIs suggested by Apple, but encountering a bug in those APIs which seems to be specific to SMB and CIFS. Users connecting via AFP don't seem to have the problem (ditto FTP and other lower level protocols, of course).

We have also confirmed the OS bug with some server vendors (after their customers complained and they investigated). Apple is aware of the issue (from multiple reports) and says they will work on it.
Photo of James

James

  • 5 Posts
  • 0 Reply Likes
So maybe it's time to implement netatalk until this issue is solved. Thanks.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 822 Reply Likes
I wouldn't got THAT far! (maybe NFS? :-) )