Skip to content

LocalFileSystem clobbers file permissions after cp_file #1524

Open
@russell-horvath

Description

@russell-horvath

Hi,

I am trying to copy a local file with the following permissions:

-rwxrwxr-x 1 rhorvath rhorvath 7994 

after copying the file it becomes:

-rw-rw-r--  1 rhorvath rhorvath 7994

I have narrowed the reason for this down to the cp_file function in LocalFileSystem where shutil.copyfile(path1, path2) doesn't copy the permission mode. This could be solved by using shutil.copy() and preserving the source file's permission mode.

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