Skip to content

fix: resolved Langflow data directory permission error on macOS with …#1237

Open
mpawlow wants to merge 1 commit intomainfrom
mp/fix/GH-1233-langflow-data-permissions-macos
Open

fix: resolved Langflow data directory permission error on macOS with …#1237
mpawlow wants to merge 1 commit intomainfrom
mp/fix/GH-1233-langflow-data-permissions-macos

Conversation

@mpawlow
Copy link
Collaborator

@mpawlow mpawlow commented Mar 24, 2026

…Podman

Issue

Permissions Fix

  • Added chmod 777 langflow-data to the ensure-langflow-data Makefile target so all make dev-* targets pre-create the directory with world-writable permissions, matching the behaviour already present in test-ci
  • Added pre-creation of the Langflow data directory with os.chmod(0o777) in setup_host_directories() so the TUI (uvx openrag) path no longer relies on Docker/Podman to create the directory on-the-fly with incorrect ownership
  • Added _resolve_langflow_data_path() helper to read the configured LANGFLOW_DATA_PATH from the TUI .env, honouring user-customised absolute paths and falling back to ~/.openrag/data/langflow-data for empty or relative values; relative paths emit a warning and fall back to the default since CWD is unpredictable in the TUI context

Factory Reset

  • Added deletion of the Langflow data directory to _factory_reset_with_data_clear() in the TUI monitor screen, mirroring the factory-reset Makefile target which already removed ./langflow-data
  • Shared _resolve_langflow_data_path() used in factory reset to target the same directory that was pre-created at startup, including a safety guard that refused deletion of any path resolving outside the user's home directory

Legacy Data Migration

  • Added langflow-data to migrate_legacy_data_directories() migration mappings so users upgrading from a Makefile-based setup had their ./langflow-data directory copied to ~/.openrag/data/langflow-data on first TUI startup
  • Added langflow_data_path to both .env update blocks in migrate_legacy_data_directories() (fresh-install path and post-copy path) so LANGFLOW_DATA_PATH was normalised to the absolute TUI default alongside all other data paths

…Podman

Issue

- #1233

Summary

- Added chmod 777 langflow-data to the ensure-langflow-data Makefile target so all make dev-* targets pre-create the directory with world-writable permissions, matching the behaviour already present in test-ci
- Added pre-creation of the Langflow data directory with os.chmod(0o777) in setup_host_directories() so the TUI (uvx openrag) path no longer relies on Docker/Podman to create the directory on-the-fly with
incorrect ownership
- Added _resolve_langflow_data_path() helper to read the configured LANGFLOW_DATA_PATH from the TUI .env, honouring user-customised absolute paths and falling back to ~/.openrag/data/langflow-data for empty or
relative values; relative paths emit a warning and fall back to the default since CWD is unpredictable in the TUI context

Factory Reset

- Added deletion of the Langflow data directory to _factory_reset_with_data_clear() in the TUI monitor screen, mirroring the factory-reset Makefile target which already removed ./langflow-data
- Shared _resolve_langflow_data_path() used in factory reset to target the same directory that was pre-created at startup, including a safety guard that refused deletion of any path resolving outside the
user's home directory

Legacy Data Migration

- Added langflow-data to migrate_legacy_data_directories() migration mappings so users upgrading from a Makefile-based setup had their ./langflow-data directory copied to ~/.openrag/data/langflow-data on first
TUI startup
- Added langflow_data_path to both .env update blocks in migrate_legacy_data_directories() (fresh-install path and post-copy path) so LANGFLOW_DATA_PATH was normalised to the absolute TUI default alongside all
other data paths
@mpawlow mpawlow requested a review from lucaseduoli March 24, 2026 14:50
@mpawlow mpawlow self-assigned this Mar 24, 2026
@github-actions github-actions bot added backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) bug 🔴 Something isn't working. labels Mar 24, 2026
@mpawlow mpawlow linked an issue Mar 24, 2026 that may be closed by this pull request
2 tasks
lucaseduoli

This comment was marked as outdated.

@lucaseduoli lucaseduoli changed the base branch from main to release-0.4.0 March 24, 2026 17:59
@github-actions github-actions bot added the lgtm label Mar 24, 2026
@lucaseduoli lucaseduoli changed the base branch from release-0.4.0 to main March 24, 2026 17:59
@github-actions github-actions bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 24, 2026
@lucaseduoli lucaseduoli self-requested a review March 24, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) bug 🔴 Something isn't working. lgtm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Langflow service is stopping a few seconds after starting the services

2 participants