Skip to content
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

Permissions of download not default of user #359

Open
joegeorgeson opened this issue May 14, 2024 · 1 comment
Open

Permissions of download not default of user #359

joegeorgeson opened this issue May 14, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@joegeorgeson
Copy link

joegeorgeson commented May 14, 2024

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:

  • the ftp download has -rw-r----- permissions (640)
  • the datasets download has -rw------- permissions (600)

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

@joegeorgeson joegeorgeson added the bug Something isn't working label May 14, 2024
@ericcox1
Copy link
Collaborator

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
[email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants