I read some netcdf files and convert to zarr files using Dask and Xarray, but the .zarray and .zmetadata ownership is owner read/write only. Is it supposed to be like that? Is it possible for me to change the file permission in the codes?
The Zarr stores I've created have permissions -rw-r--r--
for those files. That means anyone can read.
@Haiying Xu, this was a known issue at some point: https://github.com/zarr-developers/zarr-python/issues/325, and I think it was resolved...
Can you check that the umask
for the parent directory you are writing to is the same as your default umask?
The directory is 755, my default is 022
My umask is the same. I don't know if it matters, but in my case I was writing the stores to /glade/scratch, which is visible by anyone logged in. Perhaps if you haven't tried that yet, it might make a difference? If you are doing that already, then I don't know what to suggest...
I am writing to scratch. All data and .z* file have 600, directory has 755. Let me try writing to $WORK space to see any change.
Actually the umask
command gives me 0022 as the answer. I am not sure if that extra zero makes a difference. You might check your login scripts to see if there are any umask
commands given there. That is all I can think of right now...
I should also mention I was using xarray 0.17.0:
(pangeo-cordex2) casper-login2:~$. conda list xarray # packages in environment at /glade/work/bonnland/miniconda3/envs/pangeo-cordex2: # # Name Version Build Channel cf_xarray 0.5.1 pyh44b312d_0 conda-forge xarray 0.17.0 pyhd8ed1ab_0 conda-forge
I am using the same version of Xarray.
(pangeo-cordex2) casper-login2:~$ conda list zarr # packages in environment at /glade/work/bonnland/miniconda3/envs/pangeo-cordex2: # # Name Version Build Channel zarr 2.7.0 pyhd8ed1ab_0 conda-forge
I upgraded zarr to 2.8.1, but still get 600 for .zarray and data.
@Brian Bonnlander Thanks. I used the wrong environment, in fact, after I upgraded zarr, the ownership were changed to right mode.
Last updated: May 16 2025 at 17:14 UTC