Feature request: toggle for disabling and enabling sharing of a share

Currently if a share is created, the task create filesystem directory, apply permission, add info to SAMBA and reboot the service for allowing access.
Deleting should do the reverse, deleting the directory and containing files. It’s correct.

I would like to have a middle state when the share is already configured but disabled (deleted from samba or other file sharing methods) with the already configured ACLs for share and Filesystem, but not accessible.

TY for correct the classification of this post.

Of course, is nice to have also capability to delete data about the shares and the containing files of the directory.

1 Like


Something like this (OPNsense, for rules):

same in TrueNAS, here for Samba Shares (Sry German!):


My 2 cents

Could you provide a use case description? Why do you think a disabled state is useful for shared folders?

As workaround you could change the permissions to make it temporarily unaccessible.



I do see uses, eg: Migration, Transfer, Tests (!)…
These are not “normal” conditions, but are use cases during hardware upgrades, migration of Users, etc… This is useful even on small and medium sized networks…

Think of NethServers backup mount when using duplicity - it’s only mounted during backups, then unmounted…

This week, I need to migrate a total of 4 Mac Minis at a doctors practice… 2 brand new Mac Minis with M1 chip, and 2 two year old Mac Minis, 2 6 year old Mac Minis will be replaced.
As Apple’s M1 chip can’t yet run parallels or virtualbox with Windows (Needed for the doctors software and the dictation stuff…), we need to shuffle the stuff around.

In short, the doctor bought the 2 M1 too soon, before asking me… Sh*t happens…

My 2 cents

The doctor’s software runs on Windows, but the X-Ray / DICOM stuff runs on Mac, this way, we get the best of both on one screen…
I can run the doctors software with RDP, but NOT the dictation software…

  • preparation of the share before publishing with all data available and permissions ready when the share should be accessible
  • temporary deny access to a share preserving the authorizations (investigations?)
  • a way for define and preserve data received during a migration until a deadline

Which could not been understood as enough from advisors and it won’t preserve already setup ACLs (which may be subject to thirdy party evaluation and or approval)

1 Like

It seems the use case is very limited, so why not just temporary renaming the dir?

Example: you have a ibay named test, if you want to temporary disable it just: mv /var/lib/nethserver/ibay/test /var/lib/nethserver/ibay/test.inaccessible. ACL will be preserved.

1 Like

Does this affect smbd restarts later?

…maybe I’m wrong but IIRC the permissions are changed only on the shared dir itself. Propagation to its content must be run as a separate action.

I can also recall the “Hidden” feature (maybe enough for non-tech people):

Shared folders — NethServer 7 Final

Probably, yes but since it’s a temporary workaround for migration, it should not be a real problem :slight_smile:

A recent example:

1 Like

What is the best way to implement this?

a) skip the shared folder in smb.conf template expansion (samba share is not defined at all)
b) define the share in smb.conf but make it not accessible: it is there, but nobody can access it

What do you think?


It would be very usefull!

IMO this one, but I still do not want the feature :smiley: because it could conflict also with NethGUI.

If we add an enable/disable switch to the Cockpit UI it does not conflict with Nethgui because the latter does not have the new feature at all.

But you edit a disabled ibay from the NethGUI and when you apply the configuration you do not see any effect because the ibay is disabled :confused:

1 Like

Once you go with Cockpit you never go back :smiley:

1 Like

Fine, let’s see a PR for this one :slight_smile:

1 Like

Guys, pick one. Cockpit was showed down on systems with backup and restore, now it’s time to eat something back

what is this SmbStatus prop, it is listed in the README but not used in the code except in the ibay migration code

cc @giacomo @davidep


In ns6 there were multiple protocols to access an ibay, samba was optional.