[Samba] Problem with opening Excel spreadsheets that client cannot
William R Sowerbutts
will at sowerbutts.com
Fri Jul 11 12:16:33 GMT 2003
We have some Excel spreadsheets stored on our Samba 2.2.8 fileserver. The
permissions are set such that some users can write to these and some cannot,
but they can all read them (the world-readable bit is set).
When a user with read/write access tries to open the spreadsheet, there is no
problem. The user is happy and productive and outside the sun is shining.
Excellent! Have a biscuit!
When a user with only read permission tries to open the spreadsheet, however,
Excel fails to open it, saying that it cannot find the file. Auditing the
actions taken on the Samba server shows that Excel actually opens the file
several times in read-only mode, then tries to open it in read-write mode
(which fails, as the user does not have the appropriate permissions). Excel
presumably interprets this failure to open the file as "oh, the file isn't
there then". Oh dear! No biscuit for you, naughty Excel!
Clearly this is an application bug in Excel. Unfortunately my users don't
quite see it that way, pointing out that opening files from a read-only share
on a Windows machine or from a CD-ROM works fine. It is this disparity between
the behaviour of Windows and Samba SMB server implementations that is
concerning them. Chances of getting Microsoft to fix this bug are ... zero?
Does anyone have a good workaround for this problem? Perhaps the server should
indicate to the client that the file is read-only? Or perhaps the server
shouldn't fail the "open for write" operation, but instead return an "opened,
but read-only" response (if the protocol allows for this).
Any help would be appreciated.
William R Sowerbutts will at sowerbutts.com
Coder / Guru / Nrrrd http://sowerbutts.com
More information about the samba