[Samba] Samba3.0.2a, MS Office (Excel), Save problem.

System_Administrator at koppersarch.co.nz System_Administrator at koppersarch.co.nz
Mon Mar 1 00:38:06 GMT 2004

Hi all,

I've done a brief search of the list archieves and cannot find any 
solutions to this problem, so I'll post my story and hopefuly someone will 
have a better answer.

Brief Description:
This problem has now occured with a number of users, running different 
versions of Office (see below).
When saving documents, Office seems to set the read-only bit. The problem 
is best shown with Excel, which when saving a spredsheet, reports the 
following error:
"The Document was saved succesfully, but Excel cannot re-open it because 
of a sharing violation. Please Close the Document and try again."

More details:
I use Excel in all my examples here, since I personally have only been 
able to get the bug to occur when using Excel, but others have reported it 
occuring in Word aswell.
When opening the document in Excel, the permissions are fine, however when 
saving, for some reason excel sets the read-only bit, which gets 
translated in linux permissions to -r--rw-rw-. 
We are using extended ACLs, and Office always seems to muck arround with 
those bits anyhow.

Here is an ls and getfacl of a directory and file that has been opened and 
saved with Excel. (usernames/filenames changed for security reasons).

$ ls -l /home/users/bob/test/
total 2396
-r--rwx---+   1 bob root      1188352 Mar  1 12:02 abc_sales.xls
-rw-rwx---+   1 bob root      1188352 Mar  1 12:33 xyz_sales.xls
-r--rwx---+   1 bob root        13824 Mar  1 12:27 booktest.xls
-rwxrwx---+   1 bob root        19968 Mar  1 12:27 

$ getfacl /home/users/bob/test/
# file: home/users/bob/test
# owner: bob
# group: root

$ getfacl /home/users/bob/test/abc_sales.xls
# file: home/users/bob/test/abc_sales.xls
# owner: bob
# group: root

$ getfacl /home/users/bob/test/xyz_sales.xls
# file: home/users/bob/test/xyz_sales.xls
# owner: bob
# group: root

The only thing I can think of thats worth noting in the above splattering 
of info is the acl on abc_sales.xls, the group:113:rwx, there is NO gid 
113. A search of the LDAP directory AND of /etc/passwd reveals no gid 113, 
and noone belonging to any gid 113. (maybe a clue?). (oh, and no, that acl 
line wasn't there before Excel came along and screwed it).

The problem appears in Office 97, Office 2002, Office XP, and Office 2003. 

Though I believe the error message in Office 97 is different.
The problem *may* be limited to Windows 2000 and above. As in, I've seen 
it happen on 2k and above, but not on 98.
I've been running the Samba 3 pre-release and 3.0.2a samba versions and 
the problem has occured on both of them.

What I've tried:
Upgrading Samba (to 3.0.2a).
Setting "force user mode" to 0600
Finally I tried setting "inhert acls = no" and "nt acl support = no". This 
SEEMS to have fixed it (at the cost of essentially disabling ACLs).

Why is it happening?
I don't know. 
Because this is a production enviornment, I haven't been able to recompile 
w/ debugging, nor have I had the time to look through detailed log files.

Samba Info:
Version: 3.0.2a, (precompiled Debian binary). (Also occured on custom 3 
prerelease version compiled from source).
Features in use: Extended ACLs, LDAP backend (storing all samba/linux user 
accounts, machine accounts, groups, etc).
OS: Debian Woody. (running custom 2.4.21 kernel).
Noteworthy things: I have not set anything to do with locking in the 
smb.conf file. All defaults regarding locking and oplocks are in place).

Hopefully either this is a simple problem with a simple solution, or this 
helps anyone with the same problem as me, and hopefully a developer will 
spend the time to figure out the problem.

Any other questions, let me know,

(btw - I'm away till Friday, so any replies will be delayed by that long).

More information about the samba mailing list