-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix hub permission issue #91
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #91 +/- ##
==========================================
- Coverage 72.48% 68.37% -4.12%
==========================================
Files 5 5
Lines 229 234 +5
==========================================
- Hits 166 160 -6
- Misses 63 74 +11 ☔ View full report in Codecov by Sentry. |
|
||
# TODO: Set directory permissions to 750 or 700 or switch to use docker spawner | ||
# Set directory permissions to 777: Owner (rwx), Group (rwx), Others (rwx) | ||
subprocess.run(['sudo', 'chmod', '-R', '777', user_dir], check=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After exploring DockerSpawner, I'm confident that switching to it will resolve the issue, as each user's directory is mounted individually per container.
@@ -237,11 +201,6 @@ def test_ensure_user_directory_reuse_existing(mock_chown, mock_chmod, caplog): | |||
spawner = VirtualEnvSpawner() | |||
spawner._ensure_user_directory(user_dir, username) | |||
|
|||
# Check that mkdir, chown, and chmod were not called since directory exists | |||
assert user_dir.exists() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like you should keep this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Co-authored-by: MrCreosote <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable for now given this is all going to change drastically with the spawner setup
The
spark_user
, which runs the JupyterHub, needs access to users' directories to update Jupyter runtime data. However, despite setting directory permissions to770
and assigning the correct group tospark_user
, it still encounters access issues. As a temporary solution, we have set the directories to777
, hoping this will be resolved when we switch to Docker spawner.