root@ff90ca6713a3:/var/www/html# php ./occ fulltextsearch:index
Console has to be executed with the user that owns the file config/config.php
Current user id: 0
Owner id of config.php: 33
Try adding 'sudo -u #33' to the beginning of the command (without the single quotes)
If running with 'docker exec' try adding the option '-u 33' to the docker command (without the single quotes)
root@ff90ca6713a3:/var/www/html#
问题原因在于必须要用提供的www-data用户执行命令
root@ff90ca6713a3:/var/www/html# su www-data php ./occ fulltextsearch:index
This account is currently not available.
无法切换用户执行如下操作
root@ff90ca6713a3:/var/www/html# usermod -s /bin/bash www-data
root@ff90ca6713a3:/var/www/html# su www-data
www-data@ff90ca6713a3:~/html$
www-data@ff90ca6713a3:~/html$
这样在执行就可以初始化索引了
www-data@ff90ca6713a3:~/html$ php ./occ fulltextsearch:index
In StaticNoPingConnectionPool.php line 64:
No alive nodes found in your cluster
fulltextsearch:index [--output [OUTPUT]] [-r|--no-readline] [--] [<options>]