You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a local-file or SSH remote, files are expected to have 444 permissions. dvc pull should not modify files in the remote.
Current behavior
dvc push creates files in the remote according to the user's default umask, typically 022, resulting in files with 644 permissions
dvc pull notices that some files have incorrect permissions, and tries to fix them with chmod.
If the above-mentioned files are not owned by the current user, the chmod fails and dvc pull fails with an error.
To fix it, the file owner must manually chmod 444 every affected file in the remote, e.g. with find <remote-dir> -type f -exec chmod 444 '{}' \;
Solution
As discussed on Discord, dvc push should set the correct file permissions, and dvc pull should not attempt to mess with file permissions at all.
My additional suggestion is to have dvc push and dvc pull emit a warning when it detects incorrect file permissions, and/or give the user an option to ignore incorrect permissions.
This bug report is related to feature request iterative/dvc-ssh#15 , which would ensure that directories in the remote are created with either 755 or 775 permissions as needed by the user.
The text was updated successfully, but these errors were encountered:
efiop
changed the title
Files in SSH and local filesystem DVC remotes are created with incorrect permissions, causing "dvc pull" to fail due to an over-zealous consistency check
remote: ssh: push: make files protected (read-only) when uploading
May 21, 2020
Versions
Intended behavior
In a local-file or SSH remote, files are expected to have
444
permissions.dvc pull
should not modify files in the remote.Current behavior
dvc push
creates files in the remote according to the user's default umask, typically022
, resulting in files with644
permissionsdvc pull
notices that some files have incorrect permissions, and tries to fix them withchmod
.chmod
fails anddvc pull
fails with an error.chmod 444
every affected file in the remote, e.g. withfind <remote-dir> -type f -exec chmod 444 '{}' \;
Solution
As discussed on Discord,
dvc push
should set the correct file permissions, anddvc pull
should not attempt to mess with file permissions at all.My additional suggestion is to have
dvc push
anddvc pull
emit a warning when it detects incorrect file permissions, and/or give the user an option to ignore incorrect permissions.This bug report is related to feature request iterative/dvc-ssh#15 , which would ensure that directories in the remote are created with either
755
or775
permissions as needed by the user.The text was updated successfully, but these errors were encountered: