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

Sidecar should be able to access files without permission #7159

Open
matusdrobuliak66 opened this issue Feb 3, 2025 · 1 comment
Open

Sidecar should be able to access files without permission #7159

matusdrobuliak66 opened this issue Feb 3, 2025 · 1 comment
Assignees
Labels
a:dynamic-sidecar dynamic-sidecar service bug buggy, it does not work as expected

Comments

@matusdrobuliak66
Copy link
Contributor

matusdrobuliak66 commented Feb 3, 2025

Current Behavior

Sometimes, it happens that a user uploads a file that the sidecar doesn't have permission to access. As a result, the closing process hangs because the upload to S3 fails. This also means that the user can no longer open the service.

Example of issue:

log_source=simcore_sdk.node_ports_common.filemanager:_upload_path(426) | log_uid=None | log_oec=None| log_msg=The upload failed with an unexpected error:
Traceback (most recent call last):
  File ""/home/scu/.venv/lib/python3.11/site-packages/simcore_sdk/node_ports_common/filemanager.py"", line 410, in _upload_path
    e_tag, upload_links = await _upload_to_s3(
                          ^^^^^^^^^^^^^^^^^^^^
  File ""/home/scu/.venv/lib/python3.11/site-packages/simcore_sdk/node_ports_common/filemanager.py"", line 468, in _upload_to_s3
    await r_clone.sync_local_to_s3(
  File ""/home/scu/.venv/lib/python3.11/site-packages/simcore_sdk/node_ports_common/r_clone.py"", line 264, in sync_local_to_s3
    await _sync_sources(
  File ""/home/scu/.venv/lib/python3.11/site-packages/simcore_sdk/node_ports_common/r_clone.py"", line 188, in _sync_sources
    folder_size = await _get_folder_size(
                  ^^^^^^^^^^^^^^^^^^^^^^^
  File ""/home/scu/.venv/lib/python3.11/site-packages/simcore_sdk/node_ports_common/r_clone.py"", line 164, in _get_folder_size
    result = await _async_r_clone_command(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ""/home/scu/.venv/lib/python3.11/site-packages/simcore_sdk/node_ports_common/r_clone.py"", line 102, in _async_r_clone_command
    raise RCloneFailedError(
simcore_sdk.node_ports_common.r_clone.RCloneFailedError: Command rclone --config /tmp/tmprezhzs0_ size /dy-volumes/home/smu/work/workspace --json --links finished with exit code=6:
2025/02/03 10:21:14 ERROR : .Trash-8005: failed to open directory "".Trash-8005"": open /dy-volumes/home/smu/work/workspace/.Trash-8005: permission denied
{""count"":37,""bytes"":16934799989,""sizeless"":0}

Potential solutions:

  1. Ask the user whether it is okay to "delete" these files. If they say YES, these files can be ignored during upload to S3 via RClone.
  2. The sidecar can have more privileges to access files that it previously couldn't. Therefore, the sidecar would be able to change the permissions so it can upload them via RClone.
@matusdrobuliak66 matusdrobuliak66 added the bug buggy, it does not work as expected label Feb 3, 2025
@matusdrobuliak66 matusdrobuliak66 added the a:dynamic-sidecar dynamic-sidecar service label Feb 3, 2025
@GitHK
Copy link
Contributor

GitHK commented Feb 17, 2025

The issue is caused by related the version of Jupyter-Lab (they enabled trashes as some point)

When a file is deleted from the fronted of a JupyterLab version 4.x.x a trash folder is created which has no group and other read permission.

The only service that is currently using 4.x.x is s4l and @mguidon will look into removing this. The older version that are impacted should also be deprecated across all deployments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:dynamic-sidecar dynamic-sidecar service bug buggy, it does not work as expected
Projects
None yet
Development

No branches or pull requests

6 participants