Skip to content

[Bug]: Repo files owned by root even if user is set to non-root user #3360

@un-def

Description

@un-def

Steps to reproduce

type: task
image: ubuntu
user: ubuntu
working_dir: ~/repo
repos:
  - https://github.com/dstackai/dstack

commands:
  - ls -lah
  - touch test_file && echo OK
  - touch examples/test_file || echo Failed

Actual behaviour

total 132K
drwxr-xr-x 13 ubuntu ubuntu 4.0K Dec  9 14:07 .
drwxr-x---  1 ubuntu ubuntu 4.0K Dec  9 14:07 ..
drwxr-xr-x  4 root   root   4.0K Dec  9 14:07 .git
drwxr-xr-x  4 root   root   4.0K Dec  9 14:07 .github
-rw-r--r--  1 root   root    277 Dec  9 14:07 .gitignore
-rw-r--r--  1 root   root    347 Dec  9 14:07 .justfile
-rw-r--r--  1 root   root   1.1K Dec  9 14:07 .pre-commit-config.yaml
-rw-r--r--  1 root   root   2.2K Dec  9 14:07 AGENTS.md
-rw-r--r--  1 root   root   3.3K Dec  9 14:07 CODE_OF_CONDUCT.md
-rw-r--r--  1 root   root   3.0K Dec  9 14:07 CONTRIBUTING.md
-rw-r--r--  1 root   root    16K Dec  9 14:07 LICENSE.md
-rw-r--r--  1 root   root   5.8K Dec  9 14:07 README.md
drwxr-xr-x  2 root   root   4.0K Dec  9 14:07 contributing
drwxr-xr-x  7 root   root   4.0K Dec  9 14:07 docker
drwxr-xr-x  8 root   root   4.0K Dec  9 14:07 docs
drwxr-xr-x 12 root   root   4.0K Dec  9 14:07 examples
drwxr-xr-x  6 root   root   4.0K Dec  9 14:07 frontend
drwxr-xr-x  3 root   root   4.0K Dec  9 14:07 gateway
-rw-r--r--  1 root   root    16K Dec  9 14:07 mkdocs.yml
-rw-r--r--  1 root   root   5.6K Dec  9 14:07 pyproject.toml
-rw-r--r--  1 root   root    210 Dec  9 14:07 pytest.ini
-rw-r--r--  1 root   root    239 Dec  9 14:07 ruff.toml
drwxr-xr-x  6 root   root   4.0K Dec  9 14:07 runner
drwxr-xr-x  4 root   root   4.0K Dec  9 14:07 scripts
drwxr-xr-x  4 root   root   4.0K Dec  9 14:07 src
OK
touch: cannot touch 'examples/test_file': Permission denied
Failed

Expected behaviour

No response

dstack version

376be2a

Server logs

Additional information

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions