Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions public/static/docs/command-reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,13 @@ for more details.) This section contains the following options:
> These warnings are automatically turned off when `cache.type` is manually
> set.

- `cache.shared` - permissions for newly created or downloaded cache files and
directories. The default permissions are `0o664`(rw-r--r--) for files and
`0o755`(rwxr-xr-x) for directories. The only accepted value right now is
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Is presenting permissions in such way clear enough? I'm not sure if it is too hard to understand, maybe we are better describing it with words to make it as friendly as possible?

`group`, which makes DVC use `0o664`(rw-rw-r--) for files and
`0o775`(rwxrwxr-x) for directories, which is useful when you are using a a
[shared development server](/doc/use-cases/shared-development-server).

- `cache.local` - name of a local remote to use as cache directory. (Refer to
`dvc remote` for more information on "local remotes".) This will overwrite the
value provided to `dvc config cache.dir` or `dvc cache dir`.
Expand Down
17 changes: 17 additions & 0 deletions public/static/docs/use-cases/shared-development-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ to simply move it from an old cache location to the new one:
$ mv .dvc/cache/* /path/to/dvc-cache
```

Now you need to ensure that cache files/directories have appropriate
permissions, so that they could be accessed by your collegues that are members
of the same group:

```dvc
$ sudo find /path/to/dvc-cache -type f -exec chmod 0664 {} \;
$ sudo find /path/to/dvc-cache -type d -exec chmod 0775 {} \;
$ sudo chown -R myuser:ourgroup /path/to/dvc-cache/
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Needs clarification that the user needs to use his username and his group, that he shares with his team. Also sudo is probably also something that we need to describe better, as it might require asking devops guys or something, not sure if usually DS teams have sudo access on their servers.

```

## Configure shared cache

Tell DVC to use the directory we've set up above as an shared cache location by
Expand All @@ -46,6 +56,13 @@ running:
$ dvc config cache.dir /path/to/dvc-cache
```

And tell DVC to set group permissions on the newly created/downloaded cache
files:

```dvc
$ dvc config cache.shared group
```

Comment on lines +59 to +65
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The reason why it wasn't needed before is that I've assumed that people will just create their files with proper group permissions and so our cache files won't need any changes. That was clearly too much to ask, so we now do it explicitly.

Commit changes to `.dvc/config` and push them to your git remote:

```dvc
Expand Down