I have File Sharing enabled in OS X Lion, and I'm accessing the shares using Win XP and Win 7 boxes. I can read and write fine, by when I create a new file, the permissions for that file defaults to 600, and is accessible only by the account authenticated with SMB. If I edit files, permissions are not changed. It is only new files that have this problem. This means other accounts on OS X cannot access the files, and neither can the apache server, which runs as _www I think.

Is there a way to make Lion SMB mark new files as 644 instead?

  • Mountain Lion behaves the same way... – Matt Connolly Jan 17 '13 at 4:22
  • My guess is that Windows create the file with these permissions by default. I would try and change the default Windows behaviour. – Édouard Apr 18 '14 at 11:42

I think this could be a bug. I'm seeing the same behaviour in Mountain Lion too.

I've ensured that the file sharing settings are correct. Go to the folder in Finder and verify that the user has correct permissions, including creating files locally, which result in the correct (644) permissions. Go to System Preferences -> Sharing and select the share, and verify the user is in the list with read&write permissions.

Using the command line tool:

$ dscl localhost -list /Local/Default/SharePoints

to list shares, and:

$ dscl localhost -read /Local/Default/SharePoints/<sharename>

I can see:

dsAttrTypeNative:smb_createmask: 644
dsAttrTypeNative:smb_directorymask: 755

Yet files created by windows users end up with 600 permissions and are not readable by others.

While not an answer, hopefully it will give someone a step closer to finding it.

  • Filed a bug with apple, bug #13745123. They closed it as expected behaviour, which I disagree with. If anyone comes across this issue, please file a bug at bugreport.apple.com and tell them how you think it should work. – Matt Connolly May 19 '13 at 21:15

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.