<div dir="ltr"><div dir="ltr">Hi, Chao!<br><br>Great! Make sure you don't leave SELinux disabled, it is a bad solution. Something like this should help you to configure SELinux properly:<br></div><div>1) Add rule for that directory:<br></div><div dir="ltr">semanage fcontext -a -t httpd_sys_rw_content_t "/opt/CQPData(/.*)?"</div><div>2) Apply that rule:<br></div><div dir="ltr">restorecon -R -v /opt/CQPData<br><br>If you don't have semanage installed, then:<br>yum install -y policycoreutils-python<br><br>With best wishes,<br>Mansur<br><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Sa., 26. Jan. 2019 um 16:11 Uhr schrieb Chao Sun <<a href="mailto:chao.sun@sydney.edu.au">chao.sun@sydney.edu.au</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="overflow-wrap: break-word;">
<div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<font color="#004479">Hi Mansur,</font></div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<br>
</div>
<div style="text-align:start;text-indent:0px">
<font color="#004479"><span>Thank you very much, you are a gem! </span></font></div>
<div style="text-align:start;text-indent:0px">
<font color="#004479"><span><br>
</span></font></div>
<div style="text-align:start;text-indent:0px">
<font color="#004479"><span>This is exactly the case and I didn’t realise there’s such thing exist in RH enterprise (used Ubuntu/Arch in the past).</span></font></div>
<div style="text-align:start;text-indent:0px">
<font color="#004479"><span><br>
</span></font></div>
<div style="text-align:start;text-indent:0px">
<font color="#004479"><span>I have temporarily disabled SELinux and all problem solved. Upload area is viewable and upload seems to be fine.</span></font></div>
<div style="text-align:start;text-indent:0px">
<font color="#004479"><span><br>
</span></font></div>
<div style="text-align:start;text-indent:0px">
<font color="#004479">Can’t believe how much time I wasted on this issue. If you didn’t point it out I might get stuck there forever.</font></div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<font color="#004479"><br>
</font></div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<font color="#004479">Best Regards,</font></div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<font color="#004479">Chao</font></div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<font style="font-size:9px" color="#2d2d2d"><b><br>
</b></font></div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<font style="font-size:9px"><b>Dr<span class="gmail-m_-8057779345819458381Apple-converted-space"> </span>CHAO<span class="gmail-m_-8057779345819458381Apple-converted-space"> </span>SUN </b>|<span class="gmail-m_-8057779345819458381Apple-converted-space"> </span>Data Scientist <br>
<font color="#424242">Faculty of Arts and Social Sciences |<b> </b><b>The University of Sydney</b><br>
Rm N302 off Lobby J, Quadrangle A14 | The University of Sydney | NSW | 2006</font><br>
<b>T</b><font color="#424242"> +61 2 9351 4240<span class="gmail-m_-8057779345819458381Apple-converted-space"> </span> | </font><b style="color:rgb(66,66,66)">F</b><font color="#424242"> +61 2 9351 5333</font><br>
<b>E</b><font color="#424242"> <a href="mailto:chao.sun@sydney.edu.au" target="_blank">chao.sun@sydney.edu.au</a> | </font><b style="color:rgb(66,66,66)">W</b><font color="#424242"> <a href="http://sydney.edu.au" target="_blank">sydney.edu.au</a></font><br>
<font color="#797979">CRICOS 00026A</font></font></div>
</div>
<div><br>
<blockquote type="cite">
<div>On 26 Jan 2019, at 10:23 pm, mansur <<a href="mailto:6688000@gmail.com" target="_blank">6688000@gmail.com</a>> wrote:</div>
<br class="gmail-m_-8057779345819458381Apple-interchange-newline">
<div>
<div dir="ltr">
<div>Hello, Chao!</div>
<div><br>
</div>
<div>Do you have SELinux enabled? If yes, try to check its permissions...</div>
<div><br>
</div>
<div>With best wishes,</div>
<div>Mansur<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail-m_-8057779345819458381gmail_attr">Am Sa., 26. Jan. 2019 um 06:04 Uhr schrieb Chao Sun <<a href="mailto:chao.sun@sydney.edu.au" target="_blank">chao.sun@sydney.edu.au</a>>:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<font color="#004479">Hello,</font></div>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<font color="#004479"><br>
</font></div>
<div style="text-align:start;text-indent:0px"><font style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none" color="#004479">I
am recently rebuilding a CQPweb server on </font><font color="#004479">Redhat and hit on this problem that I have never met in the past.</font></div>
<div style="text-align:start;text-indent:0px"><br>
</div>
<div style="text-align:start;text-indent:0px"><font color="#004479">When I try to upload .vrt files, I got this error message:
</font></div>
<div style="text-align:start;text-indent:0px">
<blockquote type="cite"><span style="font-family:Times;font-size:inherit">ERROR: CWB registry dir ``/opt/CQPData/reg'' seems not to exist, or is not readable!</span></blockquote>
</div>
<div style="text-align:start;text-indent:0px"><span style="font-family:Times;font-size:inherit"><br>
</span></div>
<div style="text-align:start;text-indent:0px"><span><font size="3" face="Times">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.
</font></span></div>
<div style="text-align:start;text-indent:0px"><font color="#004479"><br>
</font></div>
<div style="text-align:start;text-indent:0px"><font color="#004479">
<div></div>
<blockquote type="cite">
<div>if (!is_readable($cwb_registry))</div>
<div> {</div>
<div> $infoblob .= "$EOL CHECK FAILED. Ensure that $cwb_registry"</div>
<div> . " is readable by the username this script is running under.$EOL".<b>exec('whoami')</b>;</div>
<div> break;</div>
<div> }</div>
<div> else</div>
<div> $infoblob .= " yes it is!$EOL$EOL";</div>
</blockquote>
</font></div>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<font color="#004479"><br>
</font></div>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<span style="font-family:Times;font-size:inherit">And the output confirmed the user of php script is apache.</span></div>
<div style="text-align:start;text-indent:0px">
<pre style="font-family:Helvetica;font-size:13.3333px;font-style:normal;font-variant-caps:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-variant-ligatures:normal"><blockquote type="cite">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.
<b>apache</b></blockquote></pre>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-weight:normal">
The problem is that before doing this check, I have already set the file/directory permissions to the target directories.</div>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-weight:normal">
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.</div>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-weight:normal">
<br>
</div>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-weight:normal">
None of the above file permissions solve the problem, and the directory /opt/CQPData/reg is always unreadable to CQPWeb.</div>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-weight:normal">
The permission settings to the directories are as following at the moment:</div>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-weight:normal">
<br>
</div>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-weight:normal">
/opt/CQPData</div>
<div>
<blockquote type="cite">drwxrwxr-x. 7 apache apache 70 Jan 19 13:05 CQPData</blockquote>
</div>
<div><br>
</div>
<div>Sub directories:</div>
<div>
<div></div>
<blockquote type="cite">
<div>drwxrwxr-x. 2 apache apache 6 Jan 19 13:04 cache</div>
<div>drwxrwxr-x. 2 apache apache 6 Jan 19 13:04 data</div>
<div>drwxrwxr-x. 2 mysql apache 6 Jan 19 13:04 mysql</div>
<div>drwxrwxrwx. 2 apache apache 6 Jan 26 13:14 reg</div>
<div>drwxrwxr-x. 2 apache apache 100 Jan 26 12:45 uploads</div>
</blockquote>
</div>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-weight:normal">
<br>
</div>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-weight:normal">
The registry directory is open to everyone, needless to say to the owner user and group.</div>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-weight:normal">
<br>
</div>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-weight:normal">
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.</div>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-weight:normal">
<br>
</div>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-weight:normal">
Please help on debugging this issue. Thanks in advance!</div>
</div>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<font color="#004479"><br>
</font></div>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<font color="#004479">Regards,</font></div>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<font color="#004479">Chao</font></div>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<font style="font-size:9px" color="#2d2d2d"><b><br>
</b></font></div>
<div style="font-family:Helvetica;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<font style="font-size:9px"><b>Dr<span class="gmail-m_-8057779345819458381gmail-m_-3633912640909317664Apple-converted-space"> </span>CHAO<span class="gmail-m_-8057779345819458381gmail-m_-3633912640909317664Apple-converted-space"> </span>SUN </b>|<span class="gmail-m_-8057779345819458381gmail-m_-3633912640909317664Apple-converted-space"> </span>Data
Scientist <br>
<font color="#424242">Faculty of Arts and Social Sciences |<b> </b><b>The University of Sydney</b><br>
Rm N302 off Lobby J, Quadrangle A14 | The University of Sydney | NSW | 2006</font><br>
<b>T</b><font color="#424242"> +61 2 9351 4240<span class="gmail-m_-8057779345819458381gmail-m_-3633912640909317664Apple-converted-space"> </span> | </font><b style="color:rgb(66,66,66)">F</b><font color="#424242"> +61 2 9351 5333</font><br>
<b>E</b><font color="#424242"> <a href="mailto:chao.sun@sydney.edu.au" target="_blank">chao.sun@sydney.edu.au</a> | </font><b style="color:rgb(66,66,66)">W</b><font color="#424242"> <a href="http://sydney.edu.au/" target="_blank">sydney.edu.au</a></font><br>
<font color="#797979">CRICOS 00026A</font></font></div>
</div>
<div><br>
</div>
<br>
</div>
_______________________________________________<br>
CWB mailing list<br>
<a href="mailto:CWB@sslmit.unibo.it" target="_blank">CWB@sslmit.unibo.it</a><br>
<a href="https://protect-au.mimecast.com/s/_BdvC6X13RtLO22vCp1v5b?domain=liste.sslmit.unibo.it" rel="noreferrer" target="_blank">http://liste.sslmit.unibo.it/mailman/listinfo/cwb</a><br>
</blockquote>
</div>
_______________________________________________<br>
CWB mailing list<br>
<a href="mailto:CWB@sslmit.unibo.it" target="_blank">CWB@sslmit.unibo.it</a><br>
<a href="https://protect-au.mimecast.com/s/_BdvC6X13RtLO22vCp1v5b?domain=liste.sslmit.unibo.it" target="_blank">https://protect-au.mimecast.com/s/_BdvC6X13RtLO22vCp1v5b?domain=liste.sslmit.unibo.it</a><br>
</div>
</blockquote>
</div>
<br>
</div>
_______________________________________________<br>
CWB mailing list<br>
<a href="mailto:CWB@sslmit.unibo.it" target="_blank">CWB@sslmit.unibo.it</a><br>
<a href="http://liste.sslmit.unibo.it/mailman/listinfo/cwb" rel="noreferrer" target="_blank">http://liste.sslmit.unibo.it/mailman/listinfo/cwb</a><br>
</blockquote></div>