Toggle or temporarily "disable" a share? Is this possible?

Joined
Oct 22, 2019
Messages
3,641
Is there a way to temporarily disable an SMB share without having to delete it?

Sometimes I would like to just disable a less frequently used share (to transfer large files for a specific purpose), and then I would prefer to disable the share until it's needed again. I know I can delete it, and then re-create it, but I was wondering if I can simply disable it momentarily?

Other menus have an "enable" checkbox, which serves as a basic on/off toggle.
 
Joined
Jan 4, 2014
Messages
1,644
Try toggling Browseable to Network Clients on the share.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
There's no GUI toggle for this. I experimented with adding "available = no" into a share definition in /usr/local/etc/smb4_shares.conf, but this doesn't survive a restart of the SMB service necessary to enable the change.
 
Joined
Jan 4, 2014
Messages
1,644

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Joined
Oct 22, 2019
Messages
3,641
Try toggling Browseable to Network Clients on the share.

That wouldn't work, since the share is still accessible via shortcuts, network drives, bookmarks, or manually entering it into a location bar.

I checked under Advanced Mode, but there is no such GUI toggle or checkbox for enabling / disabling the share, as Samuel Tai noted.

Samuel, I just experimented with the Auxiliary Parameters, and adding available=no (without quotes, without spaces) to the specific share seems to work, effective immediately after I click save! This should survive reboots and service restarts, as well. Thanks for the tip!

However, it would be nice, and make for a better experience, to have this as a simple checkbox, just like with other sections in the FreeNAS GUI. (See screenshots below.) For now it appears I'll have to change the yes to a no, back and forth, rather than checking a box.

One for the feature requests, I guess! o_O

example1_enable-toggle.png
missing-toggle-for-share.png

Should be fairly easy to implement, as all the checkbox would need to do is essentially change the yes to a no for the parameter available=yes
 
Top