-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Hello,
The docs (e.g., https://gridcf.org/gct-docs/6.2/gridftp/admin/index.html#gridftp-config-overview), but also the man page says:
The configuration file for the GridFTP server is read from the following locations, in the given order. Only the first file found will be loaded:
* Path specified with the -c <configfile> command line option.
* $GLOBUS_LOCATION/etc/gridftp.conf
* /etc/grid-security/gridftp.conf
Which creates a false impression that if $GLOBUS_LOCATION is not defined, /etc/gridftp.conf will be read. But in fact it isn't the case:
gct/gridftp/server/src/globus_i_gfs_config.c
Lines 3067 to 3075 in b01606b
| tmp_gl = getenv("GLOBUS_LOCATION"); | |
| if(tmp_gl) | |
| { | |
| rc = snprintf(tmp_str, PATH_MAX, "%s/etc/gridftp.conf", tmp_gl); | |
| if(rc > 0) | |
| { | |
| local_config_file = tmp_str; | |
| } | |
| } |
Later, local_config_file does become (typically) /etc/gridftp.conf:
gct/gridftp/server/src/globus_i_gfs_config.c
Lines 3269 to 3272 in b01606b
| if(local_config_file == NULL && !argv_only) | |
| { | |
| globus_eval_path("${sysconfdir}/gridftp.conf", &local_config_file); | |
| } |
However, this is only used for setting environment
gct/gridftp/server/src/globus_i_gfs_config.c
Line 3119 in b01606b
| rc = globus_l_gfs_config_load_envs_from_file(local_config_file); |
But contrary to global_config_file, it is NOT parsed by globus_l_gfs_config_load_config_file().
Most confusing, in the log gridftp then happily reports that /etc/gridftp.conf was used...
Regards,
Evgeny