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
| Function | Purpose | Arguments | Output |
|---|---|---|---|
_load_ad_management | Load shared Active Directory discovery APIs. | — | — |
_refresh_storage_paths | Resolve the configured SolidGroundUX share root. | — | — |
_share_name_for_path | Return 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_catalog | Build selectable directory paths and labels, marking effective Samba share roots. | — | (globals) |
_selected_directory_text | Format current directory selection for the menu subtitle. | — | Writes a comma-separated relative path list. |
_select_directories | Select one or more directories from the current catalog. | — | (globals) |
_require_directory_selection | Require one or more selected directories. | — | — |
_directory_is_share_root | Test whether a directory is itself exported as a Samba share. | - $1 Absolute directory path. | — |
_runtime_auth_mode | Return Samba's configured authentication mode. | — | Writes ad for ADS security, otherwise standalone. |
_ensure_kerberos_ticket | Ensure a TGT is available for direct AD discovery. | — | — |
_discover_ad_identities | Discover AD users or groups through LDAP/GSSAPI. | - $1 Identity type: user or group. | — |
_list_local_access_groups_raw | Return local groups suitable for explicit directory ACL management without | — | Writes one local access-group name per line. |
_select_identities | Select one or more users/groups appropriate to the active Samba mode. | - $1 Identity type: user or group. | — |
_select_permissions | Select directory ACL permissions and return an rwx mask. | - $1 Output variable name. | — |
_grant_directory_access | Grant selected users/groups ACL access to selected directories. | - $1 Identity type: user or group. | — |
_assigned_identities | Return named ACL identities across selected directories. | - $1 Identity type: user or group. | Writes one resolved identity per line. |
_remove_directory_access | Remove selected named user/group ACL entries. | - $1 Identity type: user or group. | — |
_format_directory_permissions | Format an ACL permission mask for display. | - $1 Three-character ACL permission mask. | Writes a compact human-readable access description. |
_show_directory_access | Display ownership and explicit ACL access for selected directories. | — | — |
_inherit_directory_access | Copy ownership, mode, and ACL model from parent to child. | - $1 Parent directory. | — |
_validate_relative_path | Validate a safe relative directory path. | - $1 Relative path. | — |
_create_directory_tree | Create a relative tree beneath one parent with inherited ACLs. | - $1 Parent directory. | — |
_select_parent_directory | Select the share root or one existing directory as parent. | - $1 Output variable name. | — |
_create_directory | Create one directory tree beneath a selected parent. | — | — |
_remove_directories | Remove selected non-share-root directories. | — | — |
_show_directories | Display all directories and share-root markers. | — | — |
_validate_selected_directories | Validate selected directory paths and ACL readability. | — | — |
_dir_menu_show | Display managed Samba directories and their current state. | — | — |
_dir_menu_select | Prompt the user to select an existing Samba directory. | — | — |
_dir_menu_create | Collect settings for creating a Samba directory. | — | — |
_dir_menu_remove | Confirm and remove a selected Samba directory. | — | — |
_dir_menu_show_access | Show access permissions for the selected Samba directory. | — | — |
_dir_menu_grant_users | Invoke the user action through the module manager. | — | — |
_dir_menu_grant_groups | Invoke the group action through the module manager. | — | — |
_dir_menu_remove_users | Invoke the user action through the module manager. | — | — |
_dir_menu_remove_groups | Invoke the group action through the module manager. | — | — |
_dir_menu_validate | Validate the managed Samba directories and access settings. | — | — |
_build_menu | Build 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
