Strange problems: Linux smbfs & samba on Linux

Strange problems: Linux smbfs & samba on Linux

Post by Stefan Hill » Mon, 29 Sep 1997 04:00:00


I'm using samba since 3-4 weeks now and have some problems with the linux
smbfs. I already send a mail to one of the authors of smbfs but he could'nt
help because he's to busy right now. Maybe anyone of you ran into the same

My environment:

  - Server: Samba 1.9.17 running on Linux2.0.30 (same probs with 2.0.29
            and Samba 1.9.16p11; (tested in various combinations))
  - Client: Linux 2.0.30 with smbfs 2.0.2 (same prob with Linux 2.0.29)

Problem 1:

If I try to make a textfile shorter (e.g. with editor joe) and save that
file with the original name, the filesize will still be that of the
original. The text is OK, but at the end of the file I'll get 0-characters
for every character I deleted. The problem can be reproduced with with the
following program. On my machine the resulting file has a size of 10, with 8
time charcter 0 in it.
When I use NT-Workstation 4.0 as a server, everything works fine!!!


#include <stdio.h>
#include <unistd.h>

int main ()
   FILE* tf = fopen("MUSTERx", "w+b");

   fprintf (tf, "0123456789");
   fclose (tf);

   tf = fopen("MUSTERx", "r+b");
   ftruncate (tf->_fileno, 2);       /* The truncation seems to make the
                                        problem */
   fclose (tf);

   return 0;


To work around this problem I made a little patch to smbfs. (I don't know if
it has any side-effects!) If anybody is interested I'll send it by email.

Problem 2:
This one deals with access-rights. Assume the following scenario:

On the client side I'm

  user: stoppok   group: group1

On the server there's a file with the following access-rights:

  rwxrwx---       SomeUser  group1  FileName1

I'll now mount the samba-share, using group1 as the workgroup. The mounting
point has the following rights: file 0777 directory 0777

From my point of view everything should be OK but when I edit and save
"FileName1", I'll get "Permission denied". Currently I work around this
using "force user = stoppok" on all shares, but this is only a temporary

Any comments on this story?

Thanks in advance,



48155 Muenster        voice: 0251/664695


Strange problems: Linux smbfs & samba on Linux

Post by Stefan Hill » Wed, 01 Oct 1997 04:00:00


seems as if I wasn't careful enough when checking my Samba environment.

  Problem 2 disappered with my update to smbfs 2.0.2 but I didn't notice




48155 Muenster        voice: 0251/664695


1. Linux to Linux with Samba -ownership & permissions

Hi all,

I am using a samba server with a mixture of Windows and Linux clients.
When I mount the smb share on the linux clients, the user, group and
permissions become relative to the client machine & the arguments used
with smbmount.

Is there any way to mount samba shares on a Linux client such that the
true ownership, group & permissions of files and directories are
displayed on the client ?

BTW, while I'm at it - am I right in thinking that Samba does not set
execute bits for new files even if the create mask implies it should,
because the execute bits are used for DOS archive / hidden / system
attributes ?

TIA for all your help

Craig Jackson

2. Functions of the ten Dip Switches

3. Strange Corruption problem between Linux & NT4??

4. Servicing 2 interrupts with the same IRQ/DIRQL ??

5. browse problem with win&linux&samba


7. browse problem with windows&linux&samba

8. Protecting a document

9. SMBFS & Linux 2.1.7x kernels

10. SAMBA & LINUX & WfWg 311 & TCPIP 32

11. Problem: Mounting smbfs shares on Linux as a normal user.

12. Linux smbfs locking problem?

13. Samba - linux-linux fails in use