Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Galaxy-sync.to-nfs: add check and ensure galaxy user #1353

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

mira-miracoli
Copy link
Contributor

because we sometimes have this file permission error, when we forget and run the script as root user

@mira-miracoli mira-miracoli changed the title add check and ensure galaxy user Galaxy-sync.to-nfs: add check and ensure galaxy user Nov 13, 2024
@@ -3,6 +3,10 @@
copy:
content: |
#!/bin/bash
if [ "$(whoami)" != "galaxy" ]; then
exec sudo -u galaxy bash "$0" "$@"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't that unexpected for a user?

Can we maybe instead just run the rsync command as galaxyuser?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my understanding this checks if the user is not galaxy and if true runs the whole script as galaxy user and exits the old invocation.

When I test the same but with root instead of galaxy on my laptop (and an echo $(whoami)), the user stays the same in my shell session. just changes for the time of the script execution:

image

@mira-miracoli mira-miracoli merged commit 0cad1ff into usegalaxy-eu:master Nov 18, 2024
2 checks passed
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.

2 participants