Manage Samba Directories

SolidGroundUX DocumentationSolidGroundUX
NL

Manage directories and directory-level access beneath Samba share storage

Source: target-root/usr/local/libexec/solidgroundux/manage-samba-directories.sh

Manage directories and directory-level access beneath Samba share storage

Public functions

Internal functions
FunctionPurposeArgumentsOutput
_load_ad_managementLoad shared Active Directory discovery APIs.——
_refresh_storage_pathsResolve the configured SolidGroundUX share root.——
_share_name_for_pathReturn the Samba share name exported from one exact directory path.- $1 Absolute directory path.Writes the share name when the path is an effective Samba share root.
_refresh_directory_catalogBuild selectable directory paths and labels, marking effective Samba share roots.—(globals)
_selected_directory_textFormat current directory selection for the menu subtitle.—Writes a comma-separated relative path list.
_select_directoriesSelect one or more directories from the current catalog.—(globals)
_require_directory_selectionRequire one or more selected directories.——
_directory_is_share_rootTest whether a directory is itself exported as a Samba share.- $1 Absolute directory path.—
_runtime_auth_modeReturn Samba's configured authentication mode.—Writes ad for ADS security, otherwise standalone.
_ensure_kerberos_ticketEnsure a TGT is available for direct AD discovery.——
_discover_ad_identitiesDiscover AD users or groups through LDAP/GSSAPI.- $1 Identity type: user or group.—
_list_local_access_groups_rawReturn local groups suitable for explicit directory ACL management without—Writes one local access-group name per line.
_select_identitiesSelect one or more users/groups appropriate to the active Samba mode.- $1 Identity type: user or group.—
_select_permissionsSelect directory ACL permissions and return an rwx mask.- $1 Output variable name.—
_grant_directory_accessGrant selected users/groups ACL access to selected directories.- $1 Identity type: user or group.—
_assigned_identitiesReturn named ACL identities across selected directories.- $1 Identity type: user or group.Writes one resolved identity per line.
_remove_directory_accessRemove selected named user/group ACL entries.- $1 Identity type: user or group.—
_format_directory_permissionsFormat an ACL permission mask for display.- $1 Three-character ACL permission mask.Writes a compact human-readable access description.
_show_directory_accessDisplay ownership and explicit ACL access for selected directories.——
_inherit_directory_accessCopy ownership, mode, and ACL model from parent to child.- $1 Parent directory.—
_validate_relative_pathValidate a safe relative directory path.- $1 Relative path.—
_create_directory_treeCreate a relative tree beneath one parent with inherited ACLs.- $1 Parent directory.—
_select_parent_directorySelect the share root or one existing directory as parent.- $1 Output variable name.—
_create_directoryCreate one directory tree beneath a selected parent.——
_remove_directoriesRemove selected non-share-root directories.——
_show_directoriesDisplay all directories and share-root markers.——
_validate_selected_directoriesValidate selected directory paths and ACL readability.——
_dir_menu_showDisplay managed Samba directories and their current state.——
_dir_menu_selectPrompt the user to select an existing Samba directory.——
_dir_menu_createCollect settings for creating a Samba directory.——
_dir_menu_removeConfirm and remove a selected Samba directory.——
_dir_menu_show_accessShow access permissions for the selected Samba directory.——
_dir_menu_grant_usersInvoke the user action through the module manager.——
_dir_menu_grant_groupsInvoke the group action through the module manager.——
_dir_menu_remove_usersInvoke the user action through the module manager.——
_dir_menu_remove_groupsInvoke the group action through the module manager.——
_dir_menu_validateValidate the managed Samba directories and access settings.——
_build_menuBuild the directory-management menu for the current selection state.——

Description

Provides interactive directory lifecycle and POSIX ACL management beneath the SolidGroundUX Samba share root. Samba share roots are identified from the effective Samba configuration and displayed with their share names. Share-level access remains owned by manage-samba-shares.sh.

Usage

Run the executable from its shell command (or installed wrapper):

manage-samba-directories
manage-samba-directories --dryrun