Samba Share question

Folks:

I have a functioning samba4 installation on 23.05.
I recently wanted to hide my mp4 files from the share and so I added veto to config file but it did not apparently work. What am I doing wrong?

config sambashare
        option name 'kodi-slides'
        option path '/mnt/apps/kodi-slides/'
        option read_only 'no'
        option guest_ok 'yes'
        option create_mask '0666'
        option dir_mask '0777'
        option timemachine '1'
        option veto_files '/*.mp4/*.wav/*.avi/*.mpg/'

Looks like a path, the way you specify it with all the forward slashes. It's not a separator, to my knowledge.

I found that the openwrt system constructs a configuration file from /etc/config/samba4 and these options show up in /var/etc/smb.con and there it does not carry the veto files options. However, in its global declaration, it does show veto files as

veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/

However, in the options for shares, it does not transfer. I wonder if the code to transfer this is coded incorrectly or there is no provision to translate this from config/samba4 to /var/etc/smb.conf anyway.

This is not a critical need but would love to find out how this works for the learning value. Wonder if there is a way to discover this.

Thanks.

Have you tried the lighter ksmbd? Maybe that one does support the 'veto' option, not sure (it sure is a better fit for OpenWrt). Usually packages have a script translating UCI settings to the native configuration somewhere in /usr/lib/.

I saw that but have not given it a shot. For simple use cases, that might be it. Will let you know.

This worked. I also noticed that the ksmbd package looks identical but it is using a very small amount of space.

Thank you so much for pointing me to the right direction.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.