Fixing Snow Leopard 10.6.3 Samba Write Access

Monday, 5. April 2010

June 21, 2010 Update: Apple appears to have solved the problem for many of us with the release of Snow Leopard 10.6.4.


To save you time I’ll give you the solution first then describe how I found it: Turn off Unix extensions in your Samba server by adding the following line to smb.conf in the global settings block and then restart Samba:

unix extensions = no
 

You might also need to unmount and re-mount your Samba volumes from OS X after you make this change.
 


After installing the OS X Snow Leopard 10.6.3 update I found that I could no longer write to Samba (SMB) volumes shared from my Linux server (running Ubuntu 9.10 Karmic Koala) that I had mounted on OS X. Whenever I tried to copy a file from OS X to the mounted Samba drive I got the error message:

The operation can’t be completed because you don’t have permission to access some of the items.
 

The operation can't be completed because you don't have permission to access some of the items.

Apparently a lot of other people are having the problem as well:

I couldn’t find the solution anywhere on Google, and I spent hours today searching. I finally found the solution serendipitously while trying to fix another Samba issue. While scouring the system and Samba logs on my Linux server to try to find a clue to the first problem I found a bunch of warnings like the following repeated over and over in the Samba log:

[2010/04/05 00:08:37, 0] param/loadparm.c:9783(widelinks_warning)
Share 'documents' has wide links and unix extensions enabled. These parameters are incompatible. Wide links will be disabled for this share.

 

This warning started logging on March 24th, the same day that Ubuntu announced and patched a vulnerability related to the Samba wide links option: Ubuntu Security Notice USN-918-1. According to Using Samba by Robert Eckstein, David Collier-Brown and Peter Kelly you should not turn off the wide links option for performance reasons. (See Appendix B: Samba Performance Tuning.) Since I use Samba for just about everything I decided that performance was more important than Unix extensions so I added the following to my smb.conf in the global settings block and restarted Samba:

unix extensions = no
 

To my amazement and delight, this had the welcome side effect of solving the Samba write access issue I was having with OS X. To verify that this is really what solved the problem I re-enabled Unix extensions and restarted Samba and the write access problem returned. Then I turned Unix extensions off again and restarted Samba and I could write to all of the Samba mounts again from OS X. So if you are having problems writing to Samba mounts from OS X ask your system administrator to turn off Unix extensions in the server’s Samba configuration.
 


I’ve had emails and comments that point out that there are advantages to having Unix extensions on. That’s true and this should be considered a workaround rather than a fix. When (if?) Apple fixes the underlying problem you should turn Unix extensions back on in your Samba server.

Share 'Fixing Snow Leopard 10.6.3 Samba Write Access' on Delicious Share 'Fixing Snow Leopard 10.6.3 Samba Write Access' on Facebook Share 'Fixing Snow Leopard 10.6.3 Samba Write Access' on Google Buzz Share 'Fixing Snow Leopard 10.6.3 Samba Write Access' on Google Reader Share 'Fixing Snow Leopard 10.6.3 Samba Write Access' on LinkedIn Share 'Fixing Snow Leopard 10.6.3 Samba Write Access' on Email

57 Responses to “Fixing Snow Leopard 10.6.3 Samba Write Access”

  1. Paul says:

    This fixed this problem for us. Thank you!!

  2. Eric says:

    Nice. Worked for me as well. Thanks for publishing this!

  3. [...] 2 : d’après le site slashdot, il faut ajouter la ligne suivante dans le smb.conf pour que ça fonctionne. unix extensions = [...]

  4. Flo says:

    Thanks so much for this hint, saved me hours of debugging on my own!

  5. Gustavo says:

    Thanks a lot, you saved my day.

  6. Juanjo says:

    Thunks a lot, I was crazy looking for this solution.

  7. [...] discovered by SplatDot, this issue can be resolved by turning off Unix extensions in your Samba server. This can be [...]

  8. Jonathan says:

    That is an awesome fix! Thank you!

  9. Running Samba with Unix extensions has its advantages when in a pure Unix – Unix environment.

    Instead of disabling Unix extensions entirely in Samba you can disable wide links with the following smb.conf parameters:

    wide links = no
    getwd cache = yes

    This disables wide links and negates the performance hit by caching getwd results.

    Alternatively upgrading to one of the latest Samba releases (3.3.13, 3.4.6, 3.5.2) this problem won’t exist because wide links are disabled by default. Enterprise Samba provides installation packages of these releases for Debian, Ubuntu, Red Hat and SUSE here:
    http://enterprisesamba.org/

    • dean says:

      Thanks for the info on fixing performance when turning off wide links. I understand that having Unix extensions on has benefits, however being able to write to my Samba mounts from OS X Snow Leopard 10.6.3 is an even bigger benefit. That’s purely a side effect of turning off Unix extensions and when Apple fixes the problem I’ll turn Unix extensions back on.

      UPDATE: Apple appears to have fixed this problem in 10.6.4.

  10. granfio says:

    To fix the problem I must write the string on the first line of global settings.
    Thanky you very much, it’s solved my job!
    Willy

  11. granfio says:

    o.t.: do you have a trick to mount an unux disk brisque system on snow leopard? When try to mount it respond for wrong password. Thank you again and sorry for off topic. You can answer bt mail granfio@gmail.com

  12. Diego says:

    I don’t understand if is it corect change smb.conf on my macbook or only on nas software control?

    thank you

  13. Oddbod says:

    Diego: your NAS will be running the samba server, not your macbook.
    So add the setting to your smb.conf on your NAS.

  14. Kenneth Hough says:

    Thank you so much! I’ve been going round in round in circles trying to figure out how to get my mac to copy over to my samba server. This just save me a huge headache. I hope Apple fixes this ASAP so I can turn back on unix extensions but as of now I really don’t care….IT WORKS!

  15. Bernard says:

    Thanks David Harrison, your solution worked for me since I can not disable unix extensions

  16. Flemming says:

    We have turned unix extensions off on our server, and we can now copy files with extended attributes to our samba server – however we can only copy folders to the server if the foldes does not have extended attributes. Trying to copy a folder with extended attributes will cause Finder to keep displaying Zero KB transferred regardless of how long we wait.

    Have any of you experienced problems with copying folders with extended attributes after disabling unix extensions on your samba server?

  17. luc says:

    it worked for me also.. thanks

  18. tarre says:

    nice, thanks a lot men, now we are happy again with our “file colors” and “weird icons”!!

    regards from spain!
    t

  19. Carl says:

    Awesome. It worked for me. Thank you.

  20. Mauricio says:

    Thank you very very much!! You saved my day

  21. Jan says:

    Great. Thank you very much for sharing this with us! Now I can go and celebrate my son’s birthday and don’t have to sit around and pull my hair out!

  22. Steve McCain says:

    God bless you, man.
    You have just saved me so much work, I can’t believe it.
    Thanks a billion!

  23. Thai says:

    Thanks! Now we can stop using ftp to access our own file server in the office.

  24. joshua taylor says:

    this originally worked for me, and now it is not working.

    here’s the respective portion of my /private/etc/smb.conf file, which is otherwise unchanged:

    [global]
    unix extensions = no
    debug pid = yes

    .. etc. This worked for me prior to getting my new laptop and trying to do it again. I’ve restarted multiple times since making this change, but it has no effect.

    any help?

  25. Charuhas says:

    I am connecting to a smb drive on a windows server. How to fix this issue?
    This problem started after upgrade t 10.6.3

  26. [...] cause of the SMB error in Mac OS X 10.6.3: After digging around I found the cause on SplatDot, and I can confirm I had the same error messages pertaining to wide links and unix extensions [...]

  27. [...] cause of the SMB error in Mac OS X 10.6.3: After digging around I found the cause on SplatDot, and I can confirm I had the same error messages pertaining to wide links and unix extensions [...]

  28. Lachlan says:

    Thank you so much! I have spent all day tearing my hair out trying to solve this problem. Cannot thank you enough!

  29. Christophe says:

    I got my hair back. Thanks a lot.

  30. Gulab Pasha says:

    Hi,

    I have the same issue, even after adding the “unix extensions = no”. I’m using Snow Leopard 10.6.3 Build 10D573.

    Please me out.

    Thanks,
    Gulab Pasha

  31. AngelVG says:

    Gracias, tenia ese mismo problema al copiar archivos desde equipos con Mac OSX 10.6.3 a mi servidor FreeBSD 7.2 amd64 con samba-3.3.10

    Me tenia como loco, estaba buscando el problema en los datos del disco en el Mac :-)

  32. Henrik says:

    Tnx for this fix. Tried everything I could think of before I found this and now it works.

  33. umesh says:

    Hey even i was facing the same problem .. If i zip the file and copy i was able to copy..But ur answer helped me a lot..

    But did apple fixed this problem?

  34. Chris says:

    Hey thanks! Helped a lot!

  35. Gulab Pasha says:

    Hi,

    I still have the same issue i can’t rename or copy text, doc, excel and pdf files to my samba shared folder.

    It gives the same error after adding

    unix extensions = no

    or

    wide links = no
    getwd cache = yes

    Please help me out. looking forward to your support.

    Thanks,
    Gulab Pasha

  36. Soufiane says:

    To Gulab Pasha:

    Hi,

    These commands need to be marked in the global settings block.

    Watch out!

  37. Tom says:

    This fixed a problem with OSX and OpenFiler NAS

  38. Nikolay says:

    Hi all,

    let me explain how I fix the problem

    First I added this in smb.conf

    unix extensions = on
    # more details at apple’s forums
    # http://discussions.apple.com/thread.jspa?messageID=7349655

    wide links = no
    getwd cache = yes
    # http://splatdot.com/fixing-snow-leopard-10-6-3-samba-write-access

    # veto files = .DS_Store
    # delete veto files = yes

    note veto files are commented out.

    Then it worked fine on all Mac’s but one. On this Mac we found a file /etc/nsmb.conf . It was edited by someone, and there were all kind of wrong information there. We deleted the file – actually renamed it, then we reboot the Mac. You need to be root to do this. After the reboot it worked fine.

    Hope this help somebody. It took us 1 week to fix it.

  39. Mikelus says:

    You save me a looooot of time!!!
    THANKS!!!

  40. Stan Sieler says:

    Your “unix extensions = no” fixed our problems, thanks!

    Mac: OS X 10.6.3

    HP-UX 11.11
    /opt/samba/bin/smbd –version
    Version 3.0.30 based HP CIFS Server A.02.04.01

  41. Erin says:

    I did this fix. It allows me to copy 1 file over to the smb server and then any other file it gives me the permission error. If i eject and reconnect i can copy 1 more file over. Very annoying.

  42. JV says:

    Thank you so much for this. Was banging my head against the wall trying to figure out why my Mac users couldn’t use the Finder to copy files up to my Samba server.

    The fix worked perfectly.

  43. Marco says:

    Thanks a lot!
    Fix worked for me too.

    Kudos, Marco.

  44. Jordan says:

    Chiming in to say thanks!

  45. Nick says:

    I had the same issue. I added the lines in the smb.conf, and now I can copy almost anything. I’m still having a problem, however, when truing to copy a .docx, or .xlsx. Any ideas would be great.

  46. Mouse says:

    And I did not have this issue with 10.6.3 – but as soon as I upgraded to 10.6.4 I lost write access to my directory mounted via SMB from remote file server (this server is not under my control).

    Any advice?

  47. Elias Solis says:

    Apple fixes the problem -> 10.6.4

  48. Chris says:

    T H A N K Y O U ! ! ! ! You just ended hours of misery!

  49. Bryan says:

    I too must express my gratitude.

    However in the near future I will be moving to FreeNAS where I don’t think there will be a problem but I need to sort through and backup my videos and photos.