This is a self-answered question that describes how to resolve problems that occur when installing the brat annotation tool, which is used to create annotated corpora for use in NLP, on an ordinary Linux machine that has SELinux enabled. This is based on version 1.3 of the tool.
The installation procedure as documented includes the steps below:
- Unpack the .tar.gz file in an (Apache) web server directory, typically
/var/www/html
or$HOME/public_html
- Possibly rename the unpacked directory from
brat-v1.3_Crunchy_Frog
to something simple such asbrat
- Enter the directory and run
sudo ./install.sh
- Start the web server (
sudo service httpd start
) if it wasn't running already
Problem: When following this procedure, any attempt to use brat in a browser (by directing it to http://localhost/brat/index.xhtml
fails with the following error messages displayed on screen:
Error: ActiongetCollectionInformation failed on error Internal Server Error
Error: Actionwhoami failed on error Internal Server Error
Error: ActionloadConf failed on error Internal Server Error
The Apache error log (typically found in /var/log/httpd/error_log
) also shows errors:
(13)Permission denied: exec of '/var/www/html/new/ajax.cgi' failed, referer: http://localhost/new/index.xhtml
Premature end of script headers: ajax.cgi, referer: http://localhost/new/index.xhtml
How to solve this problem?