Skip to content

azcopy copy with --force-if-read-only fails to overwrite local read-only files on Windows #3281

@bellsjosh

Description

@bellsjosh

Which version of the AzCopy was used?

10.31.0

Which platform are you using? (ex: Windows, Mac, Linux)

Windows

What command did you run?

azcopy.exe copy (blob_url) (local_path) --recursive --as-subdir=false --overwrite=true --force-if-read-only

What problem was encountered?

azcopy fails because it can't ovewrite a local read-only file.

How can we reproduce the problem in the simplest way?

Try to download files and overwrite at least 1 local file that is read-only.

Have you found a mitigation/solution?

Yes, setting the following environment variable which was not obvious to figure out:

AZCOPY_DOWNLOAD_TO_TEMP_PATH=false

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions