Bug 11593 - Scannedonly VFS makes directories listed as unknown files
Summary: Scannedonly VFS makes directories listed as unknown files
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: VFS Modules (show other bugs)
Version: 4.1.6
Hardware: All Linux
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
Depends on:
Reported: 2015-11-09 10:42 UTC by EOLE Team
Modified: 2020-05-18 21:01 UTC (History)
1 user (show)

See Also:

Debug level10 of wrong display of “test” directory (175.09 KB, application/x-xz)
2015-11-09 11:02 UTC, EOLE Team
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description EOLE Team 2015-11-09 10:42:02 UTC

This bug report follow a mail on the mailing-list[1].

We have some directories displayed as “unknown files” under windows when we use the scannedonly VFS.

Here are the steps to reproduce:

* Install Ubuntu Trusty Thar server, normal user called “ubuntu”

* Install “samba”

root@ubuntu:~# apt-get install samba samba-vfs-modules

* Install clamav

root@ubuntu:~# apt-get install clamav

* Download clamav database

root@ubuntu:~# freshclam

* Install a precompiled scannedonly package

root@ubuntu:~# wget http://eole.ac-dijon.fr/eole/pool/main/s/scannedonly/scannedonly_0.21-1_amd64.deb

root@ubuntu:~# dpkg -i scannedonly_0.21-1_amd64.deb

* Edit samba configuration to add

root@ubuntu:~# cat > /etc/samba/smb.conf <<EOF
    netbios name = srvtest
    workgroup = domtest
        server string = srvtest
        wins support = yes
        dns proxy = no
        domain master = no
        os level = 99
        unix extensions = no
        nt acl support = yes
        wide links = yes
        oplocks = no
        level2 oplocks = no
        vfs objects = scannedonly
        store dos attributes = no
        log file = /var/log/samba/log.%m
        max log size = 1000
        syslog = 0
        panic action = /usr/share/samba/panic-action %d
        server role = standalone server
        passdb backend = tdbsam
        obey pam restrictions = yes
        unix password sync = yes
        passwd program = /usr/bin/passwd %u
        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
        pam password change = yes
        map to guest = bad user
        usershare allow guests = yes
        comment = All Printers
        browseable = no
        path = /var/spool/samba
        printable = yes
        guest ok = no
        read only = yes
        create mask = 0700
        comment = Printer Drivers
        path = /var/lib/samba/printers
        browseable = yes
        read only = yes
        guest ok = no
        path = /home/share
        browseable = yes
        writeable = yes

* Prepare directories

root@ubuntu:~# mkdir -p /home/share/test
root@ubuntu:~# chown -R ubuntu:ubuntu /home/share

* Restart services

root@ubuntu:~# service nmbd restart; service smbd restart

* Add “ubuntu” user to samba

smbpasswd -a ubuntu

* Explore “\\srvtest\share” on a windows machine (tested with windows 7) => “test” is a directory

* Run the following command to make thing buggy

root@ubuntu:~# for letter in {a..z}; do head -c 5000 /dev/urandom > /home/share/${letter}.exe; done

* Refresh the Explorer window => “test” is an unknown file

* Delete all “.exe” files

root@ubuntu:~# rm -f /home/share/*.exe

* Refresh the explorer => “test” is an unknown file

* Delete all “.scanned” files

root@ubuntu:~# rm -f /home/share/.scanned*

* Refresh the explorer => “test” is a directory


[1] https://lists.samba.org/archive/samba/2015-October/195035.html
Comment 1 EOLE Team 2015-11-09 11:02:20 UTC
Created attachment 11589 [details]
Debug level10 of wrong display of “test” directory

This log file capture was started before the refresh where the “test” directory is displayed as “unknown file”.
Comment 2 Rowland Penny 2020-05-18 21:01:44 UTC
Closing bug report, the scannedonly VFS module was removed at 4.4.0