Samba 3.0.5rc1 problems with symlinks and unix extensions enabled

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


  [ Message resent unsigned, just in case. The signed one looks weird on
    the archive:
    http://lists.samba.org/archive/samba-technical/2004-July/036480.html ]
  
  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
  directory).
  
  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.

-- 
Sergio Talens-Oliag <sto at uv.es>            <http://www.uv.es/~sto/>
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 : http://lists.samba.org/archive/samba-technical/attachments/20040720/52cb9d76/symlink-samba.bin


More information about the samba-technical mailing list