Globalsearch doesn't work and other topics solutions seems not resolve my issue

Hi,

I need help again. Too issues in too short time for me :sick: I think that some bigger problem is hidden behind… :unsure:

The advanced Global Search doesnt works. At start of we use the crm work perfect but since a few days ago when I search anything the result shows a blank page with a link: Use basic search.

Searching in support forum some people say that must be created a cron file following the command that appears at bottom of shedule page. Ok. I did without problems but anyway the issue is there.

I want to read the suitecrm.log but this doesn’t exist. In my config.php file the log_dir and log_file are writted right, and the directory has permissions.

Anyone could help me?

suitecrm.log doesn’t exist? That’s VERY strange. It should be in the base directory of your SuiteCRM installation.

Please share some more technical info with us: version of SuiteCRM, Web Server, Operating System, Database, PHP.

Simply enabling the cron job is just the first step. Then you should go into Admin/Schedulers and check that the required jobs are actually running without errors.

Thanks pgr for your comments.

SugarCRM 7.7.6 in LAMP: CentOS7 + PHP 5.6

My error was to unknow the first step. I did it a few months after. I created a cron job as show in bottom of sheculer page, but all the tasks have “Never” in last succesful run.

We have to go looking for your logs : - )

Can you please post the results of this command:

ls -al

execute it inside your SuiteCRM main directory, so we can see what files are there and what permissions they have.

Thanks for your time!!!

total 1480
drwxrwxr-x 23 root daemon 4096 Mar 29 13:41 .
drwxr-xr-x 5 root root 94 Mar 23 08:54 …
drwxrwxr-x 6 root daemon 4096 Mar 29 09:38 568a-upload
drwxrwxrwx 2 daemon daemon 6 Mar 27 10:41 backup
drwxrwxrwx 18 daemon daemon 4096 Mar 24 11:58 cache
-rw-rw-r-- 1 root daemon 3590 Mar 27 08:13 campaign_tracker.php
-rw-rw-r-- 1 root daemon 430 Mar 27 08:13 composer.json
-rw-rw-r-- 1 root daemon 16167 Mar 27 08:13 composer.lock
-rw-r–r-- 1 daemon daemon 4353 Mar 29 12:00 config_override.php
-rw-rw-r-- 1 daemon daemon 11946 Mar 29 11:56 config.php
-rw-rw-r-- 1 root daemon 3922 Mar 27 08:13 cron.php
-rw-rw-r-- 1 root daemon 2446 Mar 27 08:13 crossdomain.xml
drwxrwxr-x 14 root daemon 4096 Mar 24 14:53 custom
drwxrwxr-x 3 root daemon 117 Oct 26 02:38 data
-rw-rw-r-- 1 root daemon 2388 Mar 27 08:13 dictionary.php
-rw-rw-r-- 1 root daemon 12403 Mar 27 08:13 download.php
-rw-rw-r-- 1 root daemon 2392 Mar 27 08:13 emailmandelivery.php
-rw-rw-r-- 1 root daemon 4912 Mar 27 08:13 export.php
-rw-rw-r-- 1 root daemon 967627 Mar 27 08:13 files.md5
drwxrwxr-x 2 root daemon 61 Oct 26 02:38 .github
-rw-rw-r-- 1 root daemon 1273 Mar 27 08:13 .gitignore
-rw-rw-r-- 1 root daemon 2811 Mar 27 08:13 HandleAjaxCall.php
-rw-rw-r-- 1 root daemon 1382 Mar 27 08:13 .htaccess
drwxrwx— 3 daemon daemon 19 Feb 28 12:21 htdocs
-rw-rw-r-- 1 root daemon 2371 Mar 27 08:13 ical_server.php
drwxrwxr-x 56 root daemon 4096 Oct 26 02:38 include
-rw-rw-r-- 1 root daemon 2374 Mar 27 08:13 index.php
drwxrwxr-x 6 root daemon 4096 Mar 29 11:43 install
-rw-rw-r-- 1 root daemon 30016 Mar 27 08:13 install.php
-rw-rw-r-- 1 root daemon 13373 Mar 27 08:13 json_server.php
drwxrwxr-x 3 root daemon 119 Oct 26 02:38 jssource
-rw-rw-r-- 1 root daemon 34539 Mar 27 08:13 LICENSE.txt
-rw-rw-r-- 1 root daemon 2313 Mar 27 08:13 log_file_restricted.html
-rw-rw-r-- 1 root daemon 2376 Mar 27 08:13 maintenance.php
-rw-r–r-- 1 daemon daemon 889 Mar 27 08:13 manifest.php
drwxrwxr-x 2 root daemon 4096 Oct 26 02:38 metadata
drwxrwx— 8 daemon daemon 110 Nov 18 09:52 mobile
drwxrwxr-x 3 root daemon 98 Oct 26 02:38 ModuleInstall
drwxrwxr-x 118 root daemon 4096 Mar 27 10:37 modules
-rw-rw-r-- 1 root daemon 2890 Mar 27 08:13 pdf.php
-rw-r–r-- 1 root root 84 Mar 29 13:41 phpinfo.php
-rw-rw-r-- 1 root daemon 2655 Mar 27 08:13 README.md
-rw-rw-r-- 1 root daemon 73 Mar 27 08:13 robots.txt
-rw-rw-r-- 1 root daemon 3588 Mar 27 08:13 run_job.php
drwxrwxr-x 12 root daemon 118 Nov 18 09:51 service
drwxrwxr-x 2 root daemon 4096 Oct 26 02:38 soap
-rw-rw-r-- 1 root daemon 4091 Mar 27 08:13 soap.php
-rw-rw-r-- 1 root daemon 5327 Mar 27 08:13 SugarSecurity.php
-rw-rw-r-- 1 root daemon 154 Mar 27 08:13 sugar_version.json
-rw-rw-r-- 1 root daemon 2263 Mar 27 08:13 sugar_version.php
-rw-r–r-- 1 daemon daemon 220867 Mar 28 11:27 suitecrm.log
-rw-rw-r-- 1 root daemon 168 Mar 27 08:13 suitecrm_version.php
-rw-rw-r-- 1 root daemon 957 Mar 27 08:13 testinstall.php
drwxrwxr-x 3 root daemon 128 Oct 26 02:38 tests
drwxrwxr-x 6 root daemon 59 Oct 26 02:38 themes
-rw-rw-r-- 1 root daemon 501 Mar 27 08:13 .travis.yml
-rw-rw-r-- 1 root daemon 5843 Mar 27 08:13 TreeData.php
drwxrwx— 3 daemon daemon 20 Nov 16 08:16 upgrade
-rwxr-xr-x 1 daemon daemon 490 Mar 27 08:13 upgradeWizard.log
-rw-rw-r-- 1 root daemon 2707 Mar 27 08:13 vcal_server.php
-rw-rw-r-- 1 root daemon 2980 Mar 27 08:13 vCard.php
drwxrwxr-x 2 root daemon 35 Oct 26 02:38 XTemplate
drwxrwxr-x 8 root daemon 4096 Oct 26 02:38 Zend

Well, from that I can tell that

  • you DO have suitecrm.log on your base directory
  • your permissions are not good, which explains basically everything that’s going wrong in your system

Please also post the results of these two commands:
sudo crontab -l -u daemon
sudo crontab -l -u root

And then fix your permissions. If your web server user is called “daemon” and it belongs to a group called “daemon” (CHECK THIS BEFORE GIVING THE COMMANDS), then these should be the commands:
sudo chown -R daemon:daemon .
sudo chmod -R 755 .
sudo chmod -R 775 cache custom modules themes data upload config_override.php

Then do a “quick repair and rebuild”.

1 Like

no crontab for daemon

          • cd /opt/bitnami/apps/suitecrm/htdocs; php -f cron.php > /dev/null 2>&1

I found this error in suitecrm.log

[FATAL] Exception in Controller: fopen(modules/AOD_Index/Index/Index/segments_kav): failed to open stream: Permission denied

Maybe is the key because globalsearch doesn’t work?


Sorry pgr but I don’t know how get my true web server user. I login to my linux server by SSH with root user and I login to mysql with root user too. So, how could check that daemon is the web server user?

Apologizes for my low knowledges!

Then you’re running your crontab as root, and that breaks permissions.

I see you’re running a Bitnami system. I also think they had a special cron command line, slightly different from that one you’re using.

First, remove that line from root’s crontab:
Enter this command:
sudo crontab -e -u root
and remove the line with cron.php from there.

Then to insert the line correctly, follow the bitnami-specific instructions here:
https://docs.bitnami.com/virtual-machine/apps/suitecrm/

Fix your permissions once more after doing that, cron runs every minute so it messes things up pretty quickly if running with the wrong user. I seem to remember the ownerships on bitnami are something like bitnami:daemon or daemon:bitnami, I don’t remember which. Google should be able to tell you.

1 Like

Sorry pgr but I don’t know how get my true web server user. I login to my linux server by SSH with root user and I login to mysql with root user too. So, how could check that daemon is the web server user?

Apologizes for my low knowledges!

Bitnami is well known so Google can tell you.

Just use

sudo chown -R bitnami:daemon .

and then the two chmods given above.

That should fix the permissions on the Index directory and get global search working. But indexing might take a long time.

chown return me:

chown: missing operand after ‘bitnami:daemon’
Try ‘chown --help’ for more information.
You have new mail in /var/spool/mail/root

Maybe would be ¿chown -r bitnami:daemon *?

Doing chown -R bitnami:daemon *

the answer is invalid user bitnami:daemon

If you look closely, the command I gave you ends with a space followed by a dot (.)

If bitnami:daemon doesn’t exist, just use daemon:daemon, so

sudo chown -R daemon:daemon .
1 Like

Do it!

Is it right, now?

total 1468
drwxrwxr-x 6 daemon daemon 4096 Mar 30 07:04 568a-upload
drwxr-xr-x 2 daemon daemon 56 Mar 30 07:04 backup
drwxrwxr-x 19 daemon daemon 4096 Mar 30 07:04 cache
-rwxr-xr-x 1 daemon daemon 3590 Mar 29 16:39 campaign_tracker.php
-rwxr-xr-x 1 daemon daemon 430 Mar 29 16:39 composer.json
-rwxr-xr-x 1 daemon daemon 16167 Mar 29 16:39 composer.lock
-rwxrwxr-x 1 daemon daemon 4130 Mar 30 07:05 config_override.php
-rwxr-xr-x 1 daemon daemon 11901 Mar 30 07:05 config.php
-rwxr-xr-x 1 daemon daemon 3922 Mar 30 07:05 cron.php
-rwxr-xr-x 1 daemon daemon 2446 Mar 29 16:39 crossdomain.xml
drwxrwxr-x 14 daemon daemon 4096 Mar 30 07:04 custom
drwxrwxr-x 3 daemon daemon 117 Mar 30 07:04 data
-rwxr-xr-x 1 daemon daemon 2388 Mar 29 16:39 dictionary.php
-rwxr-xr-x 1 daemon daemon 12403 Mar 29 16:39 download.php
-rwxr-xr-x 1 daemon daemon 2392 Mar 29 16:39 emailmandelivery.php
-rwxr-xr-x 1 daemon daemon 4912 Mar 29 16:39 export.php
-rwxr-xr-x 1 daemon daemon 967627 Mar 29 14:25 files.md5
-rwxr-xr-x 1 daemon daemon 2811 Mar 29 14:26 HandleAjaxCall.php
drwxr-xr-x 3 daemon daemon 19 Mar 30 07:04 htdocs
-rwxr-xr-x 1 daemon daemon 2371 Mar 29 16:39 ical_server.php
drwxr-xr-x 56 daemon daemon 4096 Mar 30 07:04 include
-rwxr-xr-x 1 daemon daemon 2374 Mar 29 09:43 index.php
drwxr-xr-x 6 daemon daemon 4096 Mar 30 07:04 install
-rwxr-xr-x 1 daemon daemon 30016 Mar 29 16:39 install.php
-rwxr-xr-x 1 daemon daemon 13373 Mar 29 16:39 json_server.php
drwxr-xr-x 3 daemon daemon 119 Mar 30 07:04 jssource
-rwxr-xr-x 1 daemon daemon 34539 Mar 29 16:39 LICENSE.txt
-rwxr-xr-x 1 daemon daemon 2313 Mar 29 16:39 log_file_restricted.html
drwxr-xr-x 2 daemon daemon 25 Mar 30 07:04 logs
-rwxr-xr-x 1 daemon daemon 2376 Mar 29 16:39 maintenance.php
-rwxr-xr-x 1 daemon daemon 889 Mar 29 16:39 manifest.php
drwxr-xr-x 2 daemon daemon 4096 Mar 30 07:04 metadata
drwxr-xr-x 8 daemon daemon 110 Mar 30 07:04 mobile
drwxr-xr-x 3 daemon daemon 98 Mar 30 07:04 ModuleInstall
drwxrwxr-x 116 daemon daemon 4096 Mar 30 07:04 modules
-rwxr-xr-x 1 daemon daemon 2890 Mar 29 16:39 pdf.php
-rwxr-xr-x 1 daemon daemon 84 Mar 29 13:41 phpinfo.php
-rwxr-xr-x 1 daemon daemon 2655 Mar 29 16:39 README.md
-rwxr-xr-x 1 daemon daemon 73 Mar 29 16:39 robots.txt
-rwxr-xr-x 1 daemon daemon 3588 Mar 29 16:39 run_job.php
drwxr-xr-x 12 daemon daemon 118 Mar 30 07:04 service
drwxr-xr-x 2 daemon daemon 4096 Mar 30 07:04 soap
-rwxr-xr-x 1 daemon daemon 4091 Mar 29 16:39 soap.php
-rwxr-xr-x 1 daemon daemon 5327 Mar 29 16:39 SugarSecurity.php
-rwxr-xr-x 1 daemon daemon 154 Mar 29 16:39 sugar_version.json
-rwxr-xr-x 1 daemon daemon 2263 Mar 30 07:05 sugar_version.php
-rwxr-xr-x 1 daemon daemon 223275 Mar 29 16:31 suitecrm.log
-rwxr-xr-x 1 daemon daemon 168 Mar 29 13:37 suitecrm_version.php
-rwxr-xr-x 1 daemon daemon 957 Mar 29 16:39 testinstall.php
drwxr-xr-x 3 daemon daemon 128 Mar 30 07:04 tests
drwxrwxr-x 6 daemon daemon 59 Mar 30 07:05 themes
-rwxr-xr-x 1 daemon daemon 5843 Mar 29 16:39 TreeData.php
drwxr-xr-x 3 daemon daemon 20 Mar 30 07:04 upgrade
-rwxr-xr-x 1 daemon daemon 490 Mar 29 16:39 upgradeWizard.log
-rwxr-xr-x 1 daemon daemon 2707 Mar 29 16:39 vcal_server.php
-rwxr-xr-x 1 daemon daemon 2980 Mar 29 16:39 vCard.php
drwxr-xr-x 2 daemon daemon 35 Mar 30 07:04 XTemplate
drwxr-xr-x 8 daemon daemon 4096 Mar 30 07:04 Zend

So, after permissions have changed Do I repair and rebuild and then? Only wait a few time for index will be repaired?

One more thing.

The crontab from daemon send an email saved in var/spool/mail that says: “Password: su: Authentication failure”

When I do a ls -ul in php directory, this is the result:

total 26536
-rwxr-xr-x 1 root root 96 Oct 26 02:38 composer
-rwxr-xr-x 1 root root 1148444 Oct 26 02:38 composer.phar
-rwxr-xr-x 1 root root 847 Oct 26 02:38 pear
-rwxr-xr-x 1 root root 868 Oct 26 02:38 peardev
-rwxr-xr-x 1 root root 784 Oct 26 02:38 pecl
lrwxrwxrwx 1 root root 9 Mar 30 07:16 phar -> phar.phar
-rwxr-xr-x 1 root root 20586 Oct 26 02:38 phar.phar
-rwxr-xr-x 1 root root 199 Mar 29 14:58 php
-rwxr-xr-x 1 root root 12989448 Mar 29 14:58 php.bin
-rwxr-xr-x 1 root root 203 Oct 26 02:38 php-cgi
-rwxr-xr-x 1 root root 12962760 Oct 26 02:38 php-cgi.bin
-rwxr-xr-x 1 root root 4491 Oct 26 02:38 php-config
-rwxr-xr-x 1 root root 4540 Oct 26 02:38 phpize

Maybe will be daemon the owner?

Yeaahhh! The Global Search works!!! :woohoo:

Thank you very much PGR! Thanks for your help!

I am glad you got things working.

1 Like