Skip to content

Parquet file owned by other user gets deleted upon dvc add #4348

@aernesto

Description

@aernesto

Bug Report

 
On a Linux machine, in a folder foo/ shared by various users, but not owned by me, I did:

git init .
dvc init .
git add .dvc
git commit -m "first commit"

The folder already had a file bar.parquet sitting in it, not owned by me either.
I did:

dvc add bar.parquet

And got the error

Adding...
ERROR: unexpected error - [Errno 1] Operation not permitted: '/baz/.dvc-cache/d0/3ea995971fc314c3087abbb3106e92.L6rCVNZWCFrzQRk53wdSCS'

 
Most importantly, the foo/bar.parquet file got deleted by the dvc add command above.
 
Note that I am using a shared dvc cache located at /baz/.dvc-cache/.
 

Please provide information about your setup

 
Output of dvc version:
 

$ dvc version
1.3.1

 
Additional Information (if any):
 
I could not reproduce the bug. After recreating bar.parquet manually, with me being the owner, I could run dvc add bar.parquet successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugDid we break something?p2-mediumMedium priority, should be done, but less importantresearch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions