-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Samba: 'Veto files' will hide all files no matter the share #3551
Comments
My gut feeling is that the 'backslash' icon is used in the system configuration file of smb to separate entries, so there should be some way to 'escape' the backslash when needed as part of filename veto. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still an issue. So far I'm unaware of any changes being done on this addon to fix it. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still an issue. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
No updates have been pushed for this addon so still an issue. |
I believe PR #3701 may address the issue behind the one you were calling out The Veto Files section takes the list of 'vetoed' files - and then applies the same veto list to all paths - the PR instead gives radio buttons to enable/disable specific shares in the config (So, for the case mentioned, you would only need to veto files inside the share you expose). Turning one off then removes the section that tells Samba that it should share that folder in the first place. |
@diamant-x Wanted to get your feedback on this. Per Sambas configuration for veto files, it cannot be used to veto directories listed as directories - it requires the use of Linux directory separators, and explicitly says you cannot include the '/' character in your file name - it only matches in-folder names. See smb.conf documentation on Veto Files Samba will let you hide subdirectories as if they are files. For example, (if the subdirectory is '/Media/hideme/', then Veto Files should allow you to hide the subdirectory by vetoing This also does not allow you to hide an entire top-level share (for HA, the list in the image from my previous comment), just the files/folders in it (And HA Samba Plugin only has one list of veto files, which it applies to all paths currently) Unfortunately, Samba does not appear to have the inverse of Veto files, so there is no where to provide a list of 'only expose these files' - you have to list what not to expose. With that basis - curious on your opinion on if PR #3701 (which allows the option to not expose entire shares) would meet the need you created this PR for ('Selectively enabling Shares' to hide the top level folders you do not want exposed - which Veto Files cannot do - and then within the one you do want exposed, veto files to hide files/subfolders). If so, I will add the PR as a fix for this issue - but wanted to confirm with you, as the author, before doing so. as-kholin |
Tldr; it could be considered a fix, yes. Thanks. My use case was meant to be able for another server, which is stuck in smb v1, to be able to write to a mounted folder (mounted from a non-v1 device) within media of my hassio. The issue then was that all HA shares were then exposed. This meant, among others, my SSL path would be mounted with a smb v1 connection, leaving it exposed to attack within my network. As a result I was trying to veto all files, from all other shares except one from within the media share. With your PR I should be able to do as you mention: only exposed the media, and veto all subdirectories except the one I want my "less secure device" to be able to see through samba. Thanks! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Pending merge of #3701. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Please don't close, the Pull Request is in its final steps. :) #3701 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Please don't close, the Pull Request is in its final steps. :) #3701 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still waiting for the outstanding pull request |
Describe the issue you are experiencing
Hi,
I'm trying to veto all files from all shares but one within media.
However, anytime I put a * to choose any file it will hide ALL files from ALL shares.
Reported here as well:
https://community.home-assistant.io/t/custom-samba-share/612936/16?u=diamant-x
What type of installation are you running?
Home Assistant OS
Which operating system are you running on?
Home Assistant Operating System
Which add-on are you reporting an issue with?
Samba share
What is the version of the add-on?
12.3.1
Steps to reproduce the issue
System Health information
System Information
Home Assistant Community Store
Home Assistant Cloud
Home Assistant Supervisor
Dashboards
Recorder
Anything in the Supervisor logs that might be useful for us?
Anything in the add-on logs that might be useful for us?
Additional information
Expected result should be to only match such regex.
The text was updated successfully, but these errors were encountered: