[CWB] File access permission check failed

Chao Sun chao.sun at sydney.edu.au
Sat Jan 26 03:31:24 CET 2019


Hello,

I am recently rebuilding a CQPweb server on Redhat and hit on this problem that I have never met in the past.

When I try to upload .vrt files, I got this error message:
ERROR: CWB registry dir ``/opt/CQPData/reg'' seems not to exist, or is not readable!

I then run the system diagnosis from the admin page, and in order to be certain on the username that the script is running under (I know it’s apache under RH and www-data under Ubuntu), I have added “.exec(‘whoami’)’ to the end of the check script in cqp.inc.php.

if (!is_readable($cwb_registry))
                        {
                                $infoblob .= "$EOL    CHECK FAILED. Ensure that $cwb_registry"
                                        . " is readable by the username this script is running under.$EOL".exec('whoami');
                                break;
                        }
                        else
                                $infoblob .= " yes it is!$EOL$EOL";

And the output confirmed the user of php script is apache.

Checking that CWB registry is readable by this user...
    CHECK FAILED. Ensure that /opt/CQPData/reg is readable by the username this script is running under.
apache

The problem is that before doing this check, I have already set the file/directory permissions to the target directories.
I then added user apache to the group mysql, added user mysql to the group apache. Then changed apache:apache as the directory owner, and even set the permission on all directory to 777 recursively.

None of the above file permissions solve the problem, and the directory /opt/CQPData/reg is always unreadable to CQPWeb.
The permission settings to the directories are as following at the moment:

/opt/CQPData
drwxrwxr-x. 7 apache apache 70 Jan 19 13:05 CQPData

Sub directories:
drwxrwxr-x. 2 apache apache   6 Jan 19 13:04 cache
drwxrwxr-x. 2 apache apache   6 Jan 19 13:04 data
drwxrwxr-x. 2 mysql  apache   6 Jan 19 13:04 mysql
drwxrwxrwx. 2 apache apache   6 Jan 26 13:14 reg
drwxrwxr-x. 2 apache apache 100 Jan 26 12:45 uploads

The registry directory is open to everyone, needless to say to the owner user and group.

I don’t think this is related to the MySQL settings though, but reset all the options as instructed in the admin manual to grant privileges etc.

Please help on debugging this issue. Thanks in advance!

Regards,
Chao

Dr CHAO SUN | Data Scientist
Faculty of Arts and Social Sciences | The University of Sydney
Rm N302 off Lobby J, Quadrangle A14 | The University of Sydney | NSW | 2006
T +61 2 9351 4240  | F +61 2 9351 5333
E chao.sun at sydney.edu.au<mailto:chao.sun at sydney.edu.au> | W sydney.edu.au<http://sydney.edu.au>
CRICOS 00026A


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20190126/95b0ba97/attachment-0001.html>


More information about the CWB mailing list