ncbi / datasets

NCBI Datasets is a new resource that lets you easily gather data from across NCBI databases.
https://www.ncbi.nlm.nih.gov/datasets
Other
369 stars 41 forks source link

Permissions of download not default of user #359

Open joegeorgeson opened 6 months ago

joegeorgeson commented 6 months ago

Versions conda package: 16.15.0-ha770c72_2

$ datasets --version
datasets version: 16.15.0

Describe the bug Any downloaded file has '600' permissions, but not the default of the user.

Note that in the example below:

To Reproduce Below is an example comparing an ftp download with a datasets download.

(ncbi-datasets) [user@node folder]$ wget https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000/009/045/GCA_000009045.1_ASM904v1/GCA_000009045.1_ASM904v1_genomic.fna.gz
(ncbi-datasets) [user@node folder]$ gunzip GCA_000009045.1_ASM904v1_genomic.fna.gz
(ncbi-datasets) [user@node folder]$ datasets download genome accession GCF_000009045.1
(ncbi-datasets) [user@node folder]$ unzip ncbi_dataset.zip
(ncbi-datasets) [user@node folder]$ ll
total 2.4M
-rw-r----- 1 user group 4.1M May 22  2016 GCA_000009045.1_ASM904v1_genomic.fna
-rw------- 1 user group 1.6K May 13 22:54 README.md
-rw-r----- 1 user group 1.2M May 14 05:54 ncbi_dataset.zip
drwxr-x--- 3 user group 4.0K May 14 05:55 ncbi_dataset
(ncbi-datasets) [user@node folder]$ ll ncbi_dataset/data/GCF_000009045.1
total 4176
-rw------- 1 user group 4.1M May 13 22:54 GCF_000009045.1_ASM904v1_genomic.fna
(ncbi-datasets) [user@node folder]$ umask
0027

Expected behavior Expect the file permissions to be the default of the user (umask 0027 in this case). In this specific case, importantly, this will give others users of the group access to the file.

Thank you

ericcox1 commented 6 months ago

Hi @joegeorgeson,

Thanks for opening this issue. We're going to look into matching the file permissions to the user default permissions.

Best, Eric

Eric Cox, PhD [Contractor] (he/him/his) NCBI Datasets NIH/NLM/NCBI eric.cox@nih.gov