Posted by Jerold Haas and filed under Blog

We had an issue recently with an Apple file server that we thought was interesting, and that most likely others were encountering this problem, as well.

The issue was this: Users would open a PSD file that was being shared over the network, served by an Apple Server using SMBX or Samba. The users were editing the files directly over the network through that share. When they’d try to save the file, they’d get this error message:

Could not save file because write access was not granted.

After some research and looking at some posts on forums, it seems that Finder is opening the file in read-write mode when it shows the preview, not just read-only mode. This prevents any other program from being able to write to that file after it’s been opened and edited. We also discovered that this error doesn’t seem to happen for people using the Creative Cloud version of Photoshop. Keep in mind there may be other Adobe products that don’t have this bug fixed, so the preview issue may not be fixed in other CC products.

With that in mind, we’d found a number of solutions that would solve this issue. I’m sure that others may be encountering this issue, so here’s a list of options to fix the issue.

  1. Disable preview globally in Finder.
  2. De-select the file in Finder after it’s been opened, so that the preview was no longer visible for that file.
  3. Another option is more involved, and can come with some drawbacks, such as the possibility of two users trying to write to the same file. Entering this into your Terminal will show your sharing settings:

sudo serveradmin settings sharing

You’ll see a list of your shares and the accompanying settings for each share. Each share should have a line similar to this:

sharing:sharePointList:_array_id:/Volumes/Files:smbUseStrictLocking = yes

Using serveradmin to change this value to no will tell SMBX not to lock files.

sudo serveradmin settings sharing:sharePointList:_array_id:/Volumes/Files:smbUseStrictLocking = no

You may need to restart the server for the settings to take effect.

Please note that changing this settings will have some effects. If two users are editing the same file, this setting will not prevent users from getting into a save conflict. With strict file locking turned on, only one user can write a file at a time, however when it’s disabled, two or more users can write to a file at the same time. Please consider this before making these changes to your server.

About Jerold Haas

I wear so many hats and support so many languages here. I'd likely have your eyes gloss over once I start listing all the roles I perform, such as: Javacript, ECMAscript, Actionscript, Flash, Flex, PHP, C#, F#, MySQL, MSSQL, WordPress, Joomla!, Drupal, Umbraco, Windows Server Admin, and GNU/Linux Administration. There are more frameworks and languages I've supported throughout the years with Edge Webware, but the aforementioned are likely enough for one to get a good idea at my diversity in languages. As you can see, I'm a man of many hats, supporting many development platforms, with a strong working understanding of a good number of languages, design patterns, and administrative decision-making processes. Also have a keen interest in business administration and project management. Find Jerold at Stack Overflow

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>