[Samba] mounted directory repeating unexpected files and directories

Noah admin2 at enabled.com
Thu Dec 18 22:53:20 GMT 2008


Uriel Avalos wrote:
> So let me get this straight? When you access the fileshare from a client computer, you don't see all the files?
> 
> Does the user you log in as and the user that gets mapped to the share have permissions to view all files? Could be a permissions problem. Who owns the missing files and what are their permissions?
> 
> 
> On Mon, Dec 15, 2008 at 06:04:12AM -0800, Noah wrote:
>> Hi Samba List,
>>
>> I am finding a strange problem between a mount samba directory.  Any
>> clues why this is happening?
>>
>> The server side is WD MyBook World Edition II and the export directory
>> is:  /shares/internal/Music/
>>
>> on the client site I am mounting the directory to /mnt/mybook-music
>> the client is an ubuntu server
>>
>> $ uname -a
>> Linux tsunami 2.6.24-22-generic #1 SMP Mon Nov 24 18:32:42 UTC 2008 i686
>> GNU/Linux
>> $ mount
>> /dev/sdb1 on / type ext3 (rw,errors=remount-ro)
>> proc on /proc type proc (rw,noexec,nosuid,nodev)
>> /sys on /sys type sysfs (rw,noexec,nosuid,nodev)
>> varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
>> varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
>> udev on /dev type tmpfs (rw,mode=0755)
>> devshm on /dev/shm type tmpfs (rw)
>> devpts on /dev/pts type devpts (rw,gid=5,mode=620)
>> lrm on /lib/modules/2.6.24-22-generic/volatile type tmpfs (rw)
>> securityfs on /sys/kernel/security type securityfs (rw)
>> //192.168.1.20/Music on /mnt/mybook-music type cifs (rw,mand)
>> binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc
>> (rw,noexec,nosuid,nodev)
>>
>>
>> Now here is the issue.
>>
>> The directory views for a particular directory are not the same on
>> server vs. the client side.
>>
>> From the client side I do an 'ls -l /mnt/mybook-music/Madonna/Music |
>> wc -l' see that the output equals the line could of 'mnt/mybook-music'
>>
>> $ ls -l /mnt/mybook-music/Madonna/Music | wc -l
>> 2242
>> $ ls -l /mnt/mybook-music | wc -l
>> 2242
>>
>> now on the server side
>> # ls -l /shares/internal/Music/Madonna/Music | wc -l
>> 4
>> [root at MyBookMusic Madonna]# ls -l /shares/internal/Music | wc -l
>> 2242
>>
>> The client sees all the files that are displayed from 'ls
>> /mnt/mybook-music' command and also displayed from an 'ls
>> /mnt/mybook-music/Madonna/Music' command.
>>
>> where on the server side 'ls -l /shares/internal/Music/Madonna/Music'
>> does not show the contents of '/shares/internal/Music' and only show 3
>> files.
>>
>> # ls -l /shares/internal/Music/Madonna/Music
>> total 11396
>> -rwxr-xr-x 1 noah noah 3345473 Apr 11  2006 Gone.mp3
>> -rwxr-xr-x 1 noah noah 3483214 May  3  2005 Impressive Instant.mp3
>> -rwxr-xr-x 1 noah noah 4814848 May  3  2005 Nobody's Perfect.mp3
>>
>> server side version details:
>> [root at MyBookMusic Madonna]# ipkg list_installed | grep samba
>> samba - 3.2.4-1 - Samba suite provides file and print services to
>> SMB/CIFS clients.
>>
>> client version details:
>> $ dpkg --list | grep samba
>> ii  samba                                      3.0.28a-1ubuntu4.7
>>                             a LanManager-like file and printer server
>> for Unix
>> ii  samba-common                               3.0.28a-1ubuntu4.7
>>                             Samba common files used by both the server
>> and the clien
>>
>>
>> the client mounted //192.168.1.20/Music from the fstab.
>>
>> $ cat /etc/fstab
>> # /etc/fstab: static file system information.
>> #
>> # <file system> <mount point>   <type>  <options>       <dump>  <pass>
>> proc            /proc           proc    defaults        0       0
>> # /dev/hdb1
>> UUID=e0b6f66b-b3f6-44f4-b5b6-e2cfb6e32048 /               ext3
>> defaults,errors=remount-ro 0       1
>> # /dev/hdb5
>> UUID=e1d2239f-b911-4ee2-848e-6bcb3672104d none            swap    sw
>>           0       0
>> /dev/hdd                /media/cdrom0   udf,iso9660 user,noauto,exec 0
>>      0
>> /dev/hdc                /media/cdrom1   udf,iso9660 user,noauto,exec 0
>>      0
>> //192.168.1.20/Music    /mnt/mybook-music smbfs
>> userid=<username>,passwd=<password>,rw 0 0
>>
>>
>> and the server configuration is:
>>
>> # cat /etc/smb.conf
>> [global]
>> server string=MyBookMusic
>> workgroup=workgroup
>> interfaces=192.168.1.20/24 127.0.0.1/8
>> security=user
>> smb passwd file=/var/private/smbpasswd
>> private dir=/var/private
>> guest account=www-data
>> dns proxy=No
>> lock directory=/var/locks
>> pid directory=/var/locks
>> use sendfile=Yes
>> map to guest = Bad User
>> create mask = 755
>> map hidden = Yes
>> veto files = /shares/internal/.senvidData/ /shares/internal/lost+found/
>> max log size = 1
>>
>> [dummy-2]
>> include=/var/oxsemi/shares.inc
>>
>> # cat /var/oxsemi/shares.inc
>> [PUBLIC]
>> path=/shares/internal/PUBLIC
>> force user=www-data
>> valid users=www-data noah
>> write list=www-data noah
>> guest ok=Yes
>>
>> [Music]
>> path=/shares/internal/Music
>> force user=noah
>> valid users=www-data BACKUP noah
>> write list=www-data BACKUP noah
>> guest ok=Yes
>> browseable=yes
>> writable=yes
>> security mask=0700
>> create mask=0700
>>
>>
>> Cheers,
>> Noah
>>
>>
>>
>> -- 
>> To unsubscribe from this list go to the following URL and read the
>> instructions:  https://lists.samba.org/mailman/listinfo/samba


I will be sending out a rewrite to the problem shortly.




More information about the samba mailing list