Samba 3.0.5rc1 problems with symlinks and unix extensions enabled

Sergio Talens-Oliag sto at
Tue Jul 20 11:53:02 GMT 2004

  [ Message resent unsigned, just in case. The signed one looks weird on
    the archive: ]
  I've been trying to use Samba to export Unix home directories (using
  smbfs on the linux clients) and I've found a problem while trying to
  use the Mozilla web browser on Linux.

  At first I was using Samba 3.0.4 with the following global settings:

    unix extensions = yes
    follow symlinks = yes
    wide links = yes
  After some research I found that I was having problems with symlinks
  and upgraded to Samba 3.0.5rc1, which solves some of my problems, but
  Mozilla still does not work.

  Using 'strace' I've found what my problem is: mozilla creates a
  symlink called 'lock' and later tries to 'unlock' it, but despite the
  file being there the unlink call returns ENOENT (No such file or
  The weird thing is that using 'rm' the link can be deleted, so I used
  again 'strace' and found that it does an 'access' call that fails and
  afterwards the 'unlink' call succeeds.

  I've attached a small C program that shows this behaviour.
  The output is as follows when called inside a mounted directory:

    $ symlink-samba
    Creating Link: 'link' -> 'target' ... (OK)
    Checking access for 'link' ... (ERROR: No such file or directory)
    Removing Link: 'link' ... (ERROR: No such file or directory)

  This leaves a 'link' file in the working directory, but if I call it
  again it removes the file:
    $ symlink-samba
    Creating Link: 'link' -> 'target' ... (ERROR: File exists)
    Checking access for 'link' ... (ERROR: No such file or directory)
    Removing Link: 'link' ... (OK)

  The same behaviour is seen independently of 'target' being available
  or not.

  I suppose it is a problem of the samba server or the smbfs kernel
  module (I'm using the Debian prepackaged kernel-image-2.6.6-1-686).
  If anyone on this list with knowledge of the code can verify if it is
  a local issue or where the problem is I'll be very grateful to know.

  If possible Cc: me on replies, I'm not subscribed to the list.

  Thanks in advance,


Sergio Talens-Oliag <sto at>            <>
Key fingerprint = 29DF 544F 1BD9 548C 8F15 86EF 6770 052B B8C1 FA69
-------------- next part --------------
A non-text attachment was scrubbed...
Name: symlink-samba.c
Type: text/x-csrc
Size: 625 bytes
Desc: not available
Url :

More information about the samba-technical mailing list