-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Permission denied with windows share accessed from a linux dvc client #4804
Comments
I'm assuming this network share is mounted via SMB/CIFS? You most likely need to adjust your fstab mount settings in order for |
Thank you for your reply. According to
importantly, thes user running dvc is able to create files as well as
|
@gillhofer could you run |
Yes this command works fine. However, I noticed that that this issue is due to cached files beeing created by a different user (we use a shared cache). I guess this is a NFS configuration issue now. Do you have hints on the necessary permissions? |
@gillhofer would it be possible to add both users to shared "cache-users" group? |
Thank you, we could solve it by just using a CIFS mount! 👍 However, for some reason a |
@gillhofer |
@pared They are not read only. They are RW. Is the cache supposed to be read-only? I might have missed that in your documentation. Is DVC checking whether the file could be modified to prevent cache-corruption? How would it detect that a file was modified with another user which has RW access? |
it does not have to be, but we have a mechanism in place that makes simple verification if your remote has not been meddled with (in earlier versions we used to set I think that CIFS might not handle part of code responsible for this "protection". Could you try adding some piece of data with EDIT:
Yes
It cannot without recalculation. |
@pared However, with this setup there seems to be a general issue when CIFS mounts are used as cache, as CIFS does not deal at all with file permissions. From the CIFS Documentation.
This explains why your code runs fine, but has no effect on the file permissions. If I understand this right, than either some config options is necessary to prevent md5 calculation on CIFS mounts or using something other than CIFS for mounting. If this is right, than CIFS is not really practical in our case for having access to a shared cache, which brings us back to the start. |
@gillhofer |
hmm ... we should probably update docs to mention that we don't support CIFS for DVC for now? I wonder how common/popular CIFS is. |
We will have to do that eventually. But I guess this will be a more prolonged endeavour as we need to change parts of our grown infrastructure. In the meantime we need to wait out md5 calculations and understand that not writing to remote and cache is crucial. |
@shcheklein I would not say that we don't support CIFS. Only thing that is not working is a optimization we implemented in #3472, but it does not prevent DVC from working properly. It just makes it work slower. @gillhofer That raises new question: whether we should have some kind of mechanism allowing user to say "I know what I am doing, trust the remote/cache even if its unprotected". It sounds like it could be useful, in some scenarios, especially CI, where you not necessarily edit anything, but rather check out and run. |
Maybe I did not understand everything involved completely, so please bare with me. Is there a way around a shared "cache-users" group? We have the problem that the cache is written to by LDAP users, and the pipeline-user is a non-LDAP user.
|
@gillhofer |
Closing as stale, @gillhofer feel free to reopen if the problem still occurs. |
Bug Report
Please provide information about your setup
Remote is set to a network drive on a windows share. Reading/Writing to this share is possible.
Output of
dvc version
:Additional Information (if any):
If applicable, please also provide a
--verbose
output of the command, eg:dvc add --verbose
.The files do appear in the remote directory
If the cache gets set onto the same windows fileserver the error is more verbose.
Also in this case the files do appear on the remote filesystem.
The text was updated successfully, but these errors were encountered: