Solving Write Access Denied on Apple File Sharing (SMBX)

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.

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments