Skip to content

Fix permissions UX issues with data directories - #538

Merged
ethanjli merged 7 commits into
masterfrom
fix/data-dir-perms
Feb 25, 2025
Merged

ethanjli merged 7 commits into
masterfrom
fix/data-dir-perms

Conversation

@ethanjli

@ethanjli ethanjli commented Feb 21, 2025 •

Copy link
Copy Markdown
Contributor

As reported in the 2025-01-23 software meeting, currently it's possible to download data via SFTP/SCP from the data directories as the pi (i.e. non-root) user, but it's not possible to upload data that way; this is a UX regression introduced in v2023.9.0-beta.0 (or one of the alpha prereleases before it). This PR attempts to fix that problem by initializing the relevant directories with ownership by the pi user (as explicitly set in the Python backend setup script) rather than the root user (as implicitly done by the Docker daemon's auto-creation of missing bind mount targets). As part of the fix, this PR integrates PlanktoScope/device-backend#74 and PlanktoScope/pallet-standard#88 .

This PR also simplifies the setup of directories with correct permissions required by the Python backend, including integration of PlanktoScope/device-backend#75 via PlanktoScope/pallet-standard#88.

TODO:

  • Make the segmenter run as the pi user (or as UID 1000); and test whether it works fine on my laptop that way
  • Make the dataset & logs file browsers run as the pi user (or as UID 1000)

@ethanjli ethanjli changed the title Try to fix permissions issues with data & logs directories Try to fix permissions issues with hardware controller's data/img directory Feb 24, 2025
@ethanjli ethanjli changed the title Try to fix permissions issues with hardware controller's data/img directory Fix permissions UX issues with data directories Feb 24, 2025
@ethanjli
ethanjli marked this pull request as ready for review February 25, 2025 00:38
@ethanjli

Copy link
Copy Markdown
Contributor Author

I tested this and the desired changes seem to work and I didn't notice any regressions, so I will merge this PR now!

@ethanjli
ethanjli enabled auto-merge February 25, 2025 01:46
@ethanjli
ethanjli added this pull request to the merge queue Feb 25, 2025
Merged via the queue into master with commit ba3075a Feb 25, 2025
@ethanjli
ethanjli deleted the fix/data-dir-perms branch February 25, 2025 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant