File Server: Delete/disable Shared Folder but keep the files

NethServer Version: 7.9.2009
Module: File-server

Hello world!
Greeting from newbie, As subject i tried to setup file server to replace my old samba server (centos 6.5),
during testing on creating Shared folder via web gui,
Accidentally I am clicking delete and not paying to much attention to the warning.
to my surprise by deleting shared folder in gui, this also delete actual file.

coming from my old habits editing smb.conf directly to adjust samba shared folder
is there is any way to make file-server not deleting actual file and just removing samba shared folder
like we can do by removing shared folder in smb.conf directly?

if this is by design, well i could live with it :slightly_smiling_face:

if anyone has any suggestion, let me know…

Thanks - Terima Kasih!

:pray:

Hi @mekitokazi,
welcome to the community and sorry for the late response.
I don’t know the answer myself, but perhaps @support_team can help here.

I think it’s not possible in the web UI but you could remove the shared folder from the config database on command line:

db accounts delete <SHAREDFOLDERNAME>

Apply config and restart service:

signal-event nethserver-samba-save

This way the data should be still there.

See samba and database dev documentation for more information.

3 Likes

yep this works! :smiley:
thanks @mrmarkuz for the guidance…

surely the doc has all the gem waiting to discover…

Terima Kasih!

1 Like