Andre de Koning
2003-Oct-08 21:36 UTC
[Samba] excel files not opening read only - samba 3.0
I upgraded to samba 3.0 recently. I have a lot of shares containing excel workbooks that need to be rea only for certain people and writable by others. If I try and open any one that is resctricted to read only, whether by samba "read list" etc. of using linux ext permissions windows compalins that the file could not be found, check the spelling of the filaname blah blah ... No errors are reported in the samba log files. If I copy file to the windows box and set permissions to make it user have only read access all is fine, also if I put it on a windows file server with same permissions it works. Samba 2.2.3 worked fine and I copied the share definitions accross and kept it unchanged. I tried it using linux filesystem permissions ony and also with ext set to chmod 777 and the resctricting it to read only using "read list" etc. When I create blank new excel workbooks in these shares it does the same. I tried it on various machines with w2k sp2, 3 and 4 using w2k prof, server and via terminal services. I've played around with mangling, default case, various locking option, character sets, renaming files etc. etc. - all to no avail. Has anybody seen this before? Please help if you can, this is becoming pretty serious - there seems to be something seriously wrong with my samba share permissions. Andr? de Koning IT Manager Softline VIP Payroll Tel: +27 12 420 7000 andre@vippayroll.co.za
Jeremy Allison
2003-Oct-09 01:52 UTC
[Samba] excel files not opening read only - samba 3.0
On Wed, Oct 08, 2003 at 11:36:22PM +0200, Andre de Koning wrote:> I upgraded to samba 3.0 recently. > > I have a lot of shares containing excel workbooks that need to be rea only > for certain people and writable by others. > > If I try and open any one that is resctricted to read only, whether by samba > "read list" etc. of using linux ext permissions windows compalins that the > file could not be found, check the spelling of the filaname blah blah ...Known bug in 3.0 - we've fixed it in CVS and it'll be fixed in 3.0.1. Here's the patch, sorry for the trouble. Jeremy. ==================================================================RCS file: /cvsroot/samba/source/smbd/error.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- samba/source/smbd/error.c 2002/11/05 21:46:33 1.17 +++ samba/source/smbd/error.c 2003/10/02 00:55:20 1.18 @@ -61,9 +61,6 @@ eclass = unix_ERR_class; ecode = unix_ERR_code; ntstatus = unix_ERR_ntstatus; - unix_ERR_class = SMB_SUCCESS; - unix_ERR_code = 0; - unix_ERR_ntstatus = NT_STATUS_OK; } else { while (unix_dos_nt_errmap[i].dos_class != 0) { if (unix_dos_nt_errmap[i].unix_error == errno) { @@ -93,6 +90,10 @@ if (errno != 0) DEBUG(3,("error string = %s\n",strerror(errno))); + unix_ERR_class = SMB_SUCCESS; + unix_ERR_code = 0; + unix_ERR_ntstatus = NT_STATUS_OK; + /* * We can explicitly force 32 bit error codes even when the * parameter "nt status" is set to no by pre-setting the