In old 2.8X installation of OJS we execute indexing using the cron command:
/usr/local/php53/bin/php-cli /home/myaccount/public_html/tools/rebuildSearchIndex.php
When I do that in 3.0.1.0 on other server I have got error message that permission is denied.
The file rebuildSearchIndex.php does have 0644 permission in the both cases.
Please advise does OJS 3.0.1.0 require other permissions Or I have to check with hosting company what might be an issue.
Thanks
File permissions consist of at least two parts(*): the ownership of the path components, and the mode of the path components. For example, the file rebuildSearchIndex.php may have a mode of 0644, but you will also need to consider the ownership of the file itself, and the directories which contain the file. With world read permission on the file, anyone should be able to read it, if they can get to it. So, the real question is probably what the owner and mode is for the tools directory.
As an example, if you are running the cron as user “apache”, but the tools directory is owned strictly by you without world permissions, the apache user won’t be able to run the rebuildSearchIndex.php because it can’t get to the file to read it:
You’ll want to compare the cron caller’s user and group with the user and group ownership of the directories and script for both the command (php-cli) and the script (rebuildSearchIndex.php).
Did you confirm the php-cli executable exists on the new server in the same location it is on the old server?
I have done that using cpanel. So, cpanel does have path to cli-script. I guess that is right. I am suspecting basedir permissions too so the script mazbe, complains on lack of abilitz to access basedir where articles are located.