-
Notifications
You must be signed in to change notification settings - Fork 36
CSV2RDF4LOD_PUBLISH_VARWWW_ROOT
- CSV2RDF4LOD environment variables
- The documentation directly within the source
The htdocs directory has restricted unix permissions, and it is bad practice to use root to write to that directory. This page describes which scripts use the CSV2RDF4LOD_PUBLISH_VARWWW_ROOT variable, and how to set up a user for the project so that it can write to CSV2RDF4LOD_PUBLISH_VARWWW_ROOT.
CSV2RDF4LOD_PUBLISH_VARWWW_ROOT is used to specify the path to the htdocs directory -- linking files within this directory will make them available on the web for download. The VoID metadata (created by the converter) references data dump URLs that need to exist within $CSV2RDF4LOD_PUBLISH_VARWWW_ROOT. The automation correctly places these files if CSV2RDF4LOD_PUBLISH_VARWWW_DUMP_FILES is true.
-
bin/aggregate-source-rdf.sh uses it to determine which directory to link dump files to.
- It avoids
sudo(here) if the directory'sstat --format=%Uis the same aswhoami.
- It avoids
-
bin/cr-ln-to-www-root.sh
- avoids
sudo(here) if the directory'sstat --format=%Uis the same aswhoami.
- avoids
-
bin/util/cr-full-dump.sh
- avoids
sudo(here) if the directory'sstat --format=%Uis the same aswhoami.
- avoids
-
bin/convert-aggregate.sh This was the original script, but is deprecated in favor of the three above. This one is specific to aggregating RDF conversions of tabular data, while the newer scripts handle arbitrary RDF files.
- It avoids
sudo(here) if the directory'sstat --format=%Uis the same aswhoami.
- It avoids
(We use an example to set up the user to serve from http://healthdata.tw.rpi.edu, healthdata.)
First, create the user healthdata, adding it to the group tw and also the groups healthdata and wheel (admin could replace the use of wheel):
sudo su
/usr/sbin/useradd healthdata
/usr/sbin/usermod -gtw -Ghealthdata,wheel healthdata
Then, change the ownership of CSV2RDF4LOD_PUBLISH_VARWWW_ROOT and CSV2RDF4LOD_CONVERT_DATA_ROOT:
sudo chown -R healthdata:tw /var/www
sudo chown -R healthdata:tw /srv/twc-healthdata/data/source
The account should not be accessible via ssh or su; the only way into the user is by using sudo su - healthdata. The user's shell can be set by editing /etc/passwd.
-
aggregate-source-rdf.sh avoids sudo using
stat --format=%U <file>