Samba file permission issue with Microsoft Office
March 13th, 2007 Posted in Linux, Office, Windows XPWhen hosting both windows user profiles and home directories from the same share within samba, files saved in Word and Excel (only Office XP or newer seem to be affected) become read only. Upon creating a document, the first save succeeds fine. If you look at the Unix permissions for the file, it shows read write and execute for the user (depending on your create mode in this case we’re using 7 for the user’s permissions). When you try to save the file again, it succeeds, but when you look at permissions, the write bit has been removed from the user’s permissions. Another save of the file will get you a sharing violation error from Excel or Word.
In our setup, we’ve just recently switched from one machine hosting roaming profiles for Windows and another hosting the rest of the file sharing services to a single server doing both. The problem stemmed from having bothprofile acls = yes and nt acl support = yes in smb.conf.
The odd behavior exhibited by Excel and Word stemmed from having both of those set to yes. The profile acls setting is required when hosting Windows roaming profiles. Windows will refuse to load the profile without it. NT acl support attemps to map Unix permissions to Windows NT access control lists, and is set to yes by default.
The solution is to disable NT acl support for the share. The permissions set by profile acls will still allow the user access to write to their files without having NT acl support enabled.
Here is our homes configuration in smb.conf for reference:
[homes]
read only = no
create mode = 0755
force create mode = 0755
preserve case = yes
short preserve case = yes
veto files = /.mail/
share modes = no
csc policy = disable
profile acls = yes
nt acl support = no
6 Responses to “Samba file permission issue with Microsoft Office”
By tretret on Jun 18, 2008
I found this didn’t work.
I needed to add posix locking = no
By Gaijin on Oct 8, 2008
Hello everybody.
Very good post : I had exactly the same configuration (users’ PC - Windows XP SP2 Word Excel 2007 and directories - both home and users - in the same share with Samba 3.0) and the same pbs : ACL rights set up and locking users’ access when saving a Word document.
In /etc/samba/smb.conf, nt acl support changed from yes to no, and Linux permissions are kept.
Thank’s.
By Matthias on Feb 9, 2009
Thanks for that hint by Gaijin. It has solved exact my problem.
By Hendro Wibowo on Apr 5, 2009
Thank you very much!!
Whole day scratching my hair for this problem, and it is finally solved by disabling the nt acl support in your blog.
Hendro.
By admin on Apr 5, 2009
Hi Hendro,
I’m glad I’ve been able to help.
By Ieyasu on Aug 17, 2009
You are my personal hero!
Spent hours on this, thanks for the tip