[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #MEJ-623272]: NC_DISKLESS file permissions question



Hi Charlie,

> What sets/controls the permissions on files nc_create()'d
> with NC_DISKLESS? NCO normally creates files with UNIX
> permissions 644 (octal), but those created with NC_DISKLESS have
> mode 755. Wondering what the recommended way is to ensure
> files are created with 644 permissions. I can invoke
> chmod() from within NCO if necessary, though this seems
> rather baroque.
> 
> nccopy exhibits this behavior too, as shown here:
> 
> zender@roulee:~$ nccopy -r -w ~/nco/data/in.nc ~/foo.nc
> zender@roulee:~$ ls -l foo.nc
> -rwxr-xr-x 1 zender zender 42356 Jun 26 23:36 foo.nc
> zender@roulee:~$ nccopy -r ~/nco/data/in.nc ~/foo.nc
> zender@roulee:~$ ls -l foo.nc
> -rw-r--r-- 1 zender zender 42356 Jun 26 23:37 foo.nc

This problem is fixed in netcdf-4.2.1-rc1, announced last week.  Are
you testing on a snapshot release from before that announcement?  I
just tried it with 4.2.1-rc1 in nccopy, and the files it creates have
644 permissions.

Incidentally, I haven't found an example in using nccopy where the
"-r" option for copying the input file into a diskless file first 
provides a performance improvement.

--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: MEJ-623272
Department: Support netCDF
Priority: Normal
Status: Closed