Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2175385

Summary: Cannot access Samba share with veto files = /.*/
Product: Red Hat Enterprise Linux 8 Reporter: Jared <rhelaccount01>
Component: sambaAssignee: Andreas Schneider <asn>
Status: CLOSED ERRATA QA Contact: Denis Karpelevich <dkarpele>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: aboscatt, asn, bstinson, dkarpele, jwboyer, pfilipen, simon
Target Milestone: rcKeywords: Regression, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: All   
Whiteboard: sync-to-jira review
Fixed In Version: samba-4.18.4-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2211605 (view as bug list) Environment:
Last Closed: 2023-11-14 15:50:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2211605    

Description Jared 2023-03-04 09:57:04 UTC

Comment 1 Jared 2023-03-04 10:00:12 UTC
I think I messed up the initial post. So I'll add the information again.

Description of problem:
The whole Samba share is no longer accessible when "veto files = /.*/" is present in /etc/samba/smb.conf.

We're trying to hide dot files on Home Directory Samba Shares for Windows 10 users, even if the user has "Hidden items" enabled on File Explorer.

On a previous version of CentOS Stream release 8 with Samba 4.16.4-2 installed, this is no problem. However, upon upgrading Samba to 4.17.5-0, the Samba share is no longer accessible on either Windows or Linux using the same smb.conf file.

Version-Release number of selected component (if applicable):
samba-4.17.5-0.el8.x86_64

How reproducible:
We were able to reproduce it every time.

Steps to Reproduce:
1. Open "/etc/samba/smb.conf" in your text editor
2. Add "veto files = /.*/" under the [homes] section
3. Save the smb.conf file
4. Run "sudo systemctl restart smb"
5. Try to access the Home Directory Samba Share

Actual results:
Cannot access any Home Directory Samba Share at all. 

Expected results:
Can access a Home Directory Samba Share with all the dot files and folders being hidden.


Additional info:

sudo cat /etc/samba/smb.conf 
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.
#
# Note:
# SMB1 is disabled by default. This means clients without support for SMB2 or
# SMB3 are no longer able to connect to smbd (by default).

[global]
        workgroup = SAMBA
        security = user

        passdb backend = tdbsam

        printing = cups
        printcap name = cups
        load printers = yes
        cups options = raw

        # Install samba-usershares package for support
        include = /etc/samba/usershares.conf

[homes]
        comment = Home Directories
        valid users = %S, %D%w%S
        browseable = No
        read only = No
        inherit acls = Yes
        veto files = /.*/

[printers]
        comment = All Printers
        path = /var/tmp
        printable = Yes
        create mask = 0600
        browseable = No

[print$]
        comment = Printer Drivers
        path = /var/lib/samba/drivers
        write list = @printadmin root
        force group = @printadmin
        create mask = 0664
        directory mask = 0775

Comment 2 Andreas Schneider 2023-03-28 12:23:07 UTC
Extend source3/script/tests/test_veto_files.sh

Comment 3 Andreas Schneider 2023-04-19 16:00:24 UTC
It fails because the "." and ".." directories matches '.*'.

Comment 6 Simon Wilson 2023-05-13 04:45:13 UTC
I just spent three hours trying to work out why my Samba shares stopped working. 

See https://bugzilla.samba.org/show_bug.cgi?id=15360 - this is a bug, and has been fixed upstream

Comment 13 errata-xmlrpc 2023-11-14 15:50:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: samba security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:7139

Comment 14 Red Hat Bugzilla 2024-03-14 04:25:23 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days