Subject: Re: using Samba with non-ffs partitions
To: None <netbsd-users@netbsd.org>
From: Chavdar Ivanov <ci4ic4@gmail.com>
List: netbsd-users
Date: 12/24/2007 09:16:33
On 23/12/2007, Klaus Heinz <k.heinz@dezsieben.kh-22.de> wrote:
> Hi,
>
> from time to time I have the need to use Samba, usually to share a FFS
> filesystem.
> Today I tried to share an MSDOS and a CD9660 partition and failed miserably.
> With a fresh Samba package samba-3.0.26anb4 on NetBSD/i386 3.1 GENERIC and
> the those differences to the default smb.conf
>
>   @@ -23,7 +23,7 @@
>    [global]
>
>    # workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
>   -   workgroup = MYGROUP
>   +   workgroup = WORKGROUP
>   @@ -64,6 +64,7 @@
>    # this tells Samba to use a separate log file for each machine
>    # that connects
>    ;  log file = /usr/local/samba/var/log.%m
>   +  log file = /var/log/samba/log.%m
>
>   @@ -268,4 +269,32 @@
>    ;   printable = no
>    ;   create mask = 0765
>
>   +[share0]
>   +   comment =  MSDOS
>   +   path = /msdos
>   +   public = yes
>   +   writable = yes
>   +   printable = no
>   +
>   +[share1]
>   +   comment =  ISO9660
>   +   path = /cd9660
>   +   public = yes
>   +   writable = yes
>   +   printable = no
>   +
>   +[share2]
>   +   comment =  FFS
>   +   path = /ffs
>   +   public = yes
>   +   writable = yes
>   +   printable = no
>   +
>   +[share3]
>   +   comment =  EXT2FS
>   +   path = /ext2fs
>   +   public = yes
>   +   writable = yes
>   +   printable = no
>
> I see the following behaviour:
>
> - share2 on FFS works as expected, I can see all files in Windows Explorer,
>   create new files and delete existing files
> - I can see no files in share3 on Ext2fs, but I can access them if I know
>   the name. New files created on Windows appear on the NetBSD side but
>   disappear from the Windows Explorer view when I refresh the display.
>   I can delete known files/directories from the Windows command line (using
>   a drive letter) although I cannot see them.
> - I cannot view share0 (MSDOS) or share1 (CD9660) with Windows Explorer.

On a -current system I have no problems accessing cd9660 or fat32 partitions.

If I share NTFS partitions mounted under NetBSD, however, I can see
the root of the filesystem, but nothing underneath - directories are
not reported as such.

This is true accessing from both Windows (Vista) file explorer and
just using smbclient on the NetBSD machine. The NTFS filesystem is
accessible normally from NetBSD, though.

>   The error is (roughly translated from German):
>
>     You cannot access \\silence\share0. Maybe you do not have permission to
>     access  this network resource. Ask the administrator of the server
>     whether you have permissions.
>
>     The mentioned network name is not available anymore
>
>   Assigning a drive letter to share0 and share1 is successful, I can
>   even change the current directory to those drive letters but the "dir"
>   command says
>
>     File not found
>
> All four filesystems for this test are based on vnd(4), permissions of
> the mounted filesystems are as follows
>
>   $ ls -ald /msdos /cd9660 /ffs /ext2fs
>   drwxr-xr-x  3 10000  1704006   2048 Jan  1  1970 /cd9660
>   drwxrwxr-x  4 root   wheel     1024 Dec 23 18:44 /ext2fs
>   drwxrwxr-x  3 root   wheel      512 Dec 23 18:41 /ffs
>   drwxrwxr-x  1 root   wheel    16384 Jan  1  1980 /msdos
>
>
> Has anyone seen such behaviour with NetBSD 3?
> I am surprised that Samba on NetBSD shows different behaviour dependent on
> the underlying filesystem of the share, something I have never seen on
> Solaris where I also use Samba.

I haven't seen this either - for NTFS; it's fine for me for the
others; I have no ext2/3 partition on my laptop to try.

>
> ciao
>      Klaus
>
>


Cheers,
-- 
----------------------------------------------------------------
Chavdar Ivanov   | Talbot Way, Small Heath Business Park
Delcam UK        | Birmingham B10 0HJ, United Kingdom
Customer Support | (+44)121-6831014
----------------------------------------------------------------