Skip to content

Replace mv with sudo cp && rm (or add chown 0:0 after mv) elsewhere to ensure root:root ownership. #3705

Closed as not planned

Description

@peterschmidt85

I think we should replace mv with sudo cp && rm (or add chown 0:0 after mv) elsewhere to ensure root:root ownership. For example, shim.env is owned by SSH user (as it uploaded via SFTP):

# ls -l /root/.dstack
total 33236
-rw-r--r--  1 root   root        278 Mar 26 14:24 host_info.json
drwxr-xr-x 11 root   root       4096 Mar 26 16:26 runners
-rw-rw-r--  1 debian debian      395 Mar 26 14:24 shim.env
-rw-r--r--  1 root   root   34015187 Mar 27 07:14 shim.log

Originally posted by @un-def in #3702 (comment)

Activity

  1. changed the title [-]I think we should replace `mv` with `sudo cp && rm` (or add `chown 0:0` after `mv`) elsewhere to ensure `root:root` ownership. For example, `shim.env` is owned by SSH user (as it uploaded via SFTP):[/-] [+]Replace `mv` with `sudo cp && rm` (or add `chown 0:0` after `mv`) elsewhere to ensure `root:root` ownership.[/+] on Apr 9, 2026
  2. github-actions commented on May 10, 2026

    @github-actions

    This issue is stale because it has been open for 30 days with no activity.

  3. github-actions commented on May 24, 2026

    @github-actions

    This issue was closed because it has been inactive for 14 days since being marked as stale. Please reopen the issue if it is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions