Opened 10 years ago

Closed 9 years ago

#386 closed enhancement (fixed)

Check whether $BUFR_TABLES and $BUFR_LIBRARY are writable before trying to do so

Reported by: Ian Culverwell Owned by: Dave Offiler
Priority: normal Milestone: 9.0
Component: ropp_io Version: 7.1
Keywords: BUFR Cc:

Description

Axel von Engeln (EUM) writes:

I just came across another possible problem. I wanted to re-install
ROPP7 into a local directory, using the already installed libs of
netCDF, bufr, etc, and it fails since it cannot remove the 
roppbufrcodes.nl file (which we have centrally installed). Not sure 
why this is required. Might be sufficient to just cross check if the 
latest version is there.

Proposed solution: see ticket title.

Change history (4)

comment:1 by Ian Culverwell, 10 years ago

Change to ropp_io/bufr/Makefile.am ropp_io/bufr/Makefile.in and (reversible) committed at r4403.

comment:2 by Dave Offiler, 9 years ago

Owner: changed from Ian Culverwell to Dave Offiler
Status: newassigned

comment:3 by Dave Offiler, 9 years ago

Status: assignedaccepted

There is no need in normal usage to check whether BUFR_LIBRARY or BUFR_TABLE are writeable by the user as the buildpack script sets both to ROPP_ROOT/data/bufr and ROPP_ROOT is already checked.

Nevertheless, I've adapted the existing check as a new function which is then used to check ROPP_ROOT as before, and BUFR_LIBRARY or BUFR_TABLES when starting to build those packages (even though those checks are really redundant) in my do_build90 branch.

The new function has been tested stand-alone and writeability of ROPP_ROOT can simply be tested by setting that environment variable to a protected path such as /usr. If ROPP_ROOT is writeable, then the BUFR directory will then automatically be ok - unless ROPP_ROOT/data/bufr pre-exists and has been explicitly denied access to the user thus:

$ chmod 555 $ROPP_ROOT/data/bufr
$ ll -d $ROPP_ROOT/data/bufr
dr-xr-xr-x 2 frdo satsense 4408 Sep  8 12:37 /data/nwp1/grassaf/ropp/data/bufr/
$ ./buildpack mobufr ifort

>> Checking MOBUFR package ...

 - Found installed source package bufr-23.0.1 (MOBUFR version 23.0.1)

------------------------------------------------------------------
>> Building MetDB BUFR (v23.0.1) with 'ifort' F95 compiler on LINUX
------------------------------------------------------------------
*** You do not have write permission to /data/nwp1/grassaf/ropp/data/bufr/
    Please set another path for BUFR_LIBRARY

# back to normal
$ chmod 775 $ROPP_ROOT/data/bufr
$ ll -d $ROPP_ROOT/data/bufr
drwxrwxr-x 2 frdo satsense 4408 Sep  8 12:37 /data/nwp1/grassaf/ropp/data/bufr/

However, Axel's problem would not be solved by this update; a central directory may be writeable by the user (and group), but individual files created there by someone else in the group may not be deleteable by the current user. Setting correct group permissions - either post-creation or by default mode - is an issue for the people concerned; it's not appropriate for ROPP to mess with such system/security/permission settings.

comment:4 by Dave Offiler, 9 years ago

Resolution: fixed
Status: acceptedclosed

Closing this ticket as job done according to the title as requested.

Note: See TracTickets for help on using tickets.