我有一个新安装的NextCloud22.2.0,我是根据[这些instructions:](https://www.howtoforge.com/community/threads/how-can-i-install-nextcloud-correctly-with-ispconfig.83650/)安装的
在NC安装之后,我的NC日志中没有任何错误。然而,在概述部分,我有一些基本的收益,我知道是“假阳性”为一个新的安装。在那里,我想运行NC occ以便修复:
./occ integrity:check-core
但是,我得到了以下错误:
Your data directory is invalid
Ensure there is a file called ".ocdata" in the root of the data directory.
Cannot create "data" directory
This can usually be fixed by giving the webserver write access to the root directory. See https://docs.nextcloud.com/server/22/go.php?to=admin-dir_permissions
Setting locale to en_US.UTF-8/fr_FR.UTF-8/es_ES.UTF-8/de_DE.UTF-8/ru_RU.UTF-8/pt_BR.UTF-8/it_IT.UTF-8/ja_JP.UTF-8/zh_CN.UTF-8 failed
Please install one of these locales on your system and restart your webserver.
An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /web/lib/private/Console/Application.php:162
Stack trace:
#0 /web/console.php(98): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /web/occ(11): require_once('/web/console.ph...')
#2 {main}我能够解决这个错误:
Setting locale to en_US.UTF-8/fr_FR.UTF-8/es_ES.UTF-8/de_DE.UTF-8/ru_RU.UTF-8/pt_BR.UTF-8/it_IT.UTF-8/ja_JP.UTF-8/zh_CN.UTF-8 failed
Please install one of these locales on your system and restart your webserver.通过使用:
chattr -i /var/www/clients/client1/web19/
jk_cp -j /var/www/clients/client1/web19/ /usr/lib/locale
chattr +i /var/www/clients/client1/web19/谁能告诉我如何解决两个剩余的错误,以便NC occ将正确工作?
谢谢
此外,用户的权限也是正确的:
# ls -la /var/www/clients/client1/web19
total 60
drwxr-xr-x 15 root root 4096 Nov 12 15:12 .
drwxr-xr-x 9 root root 4096 Nov 12 14:50 ..
lrwxrwxrwx 1 root root 7 Nov 12 15:09 bin -> usr/bin
drwxr-xr-x 2 web19 client1 4096 Nov 12 14:50 cgi-bin
drwxr-xr-x 2 root root 4096 Nov 12 17:36 dev
drwxr-xr-x 8 root root 4096 Nov 12 15:12 etc
drwxr-xr-x 4 root root 4096 Nov 12 15:12 home
lrwxrwxrwx 1 root root 7 Nov 12 15:09 lib -> usr/lib
lrwxrwxrwx 1 root root 9 Nov 12 15:09 lib64 -> usr/lib64
drwxr-xr-x 2 root root 4096 Nov 12 19:58 log
drwx--x--- 2 web19 client1 4096 Nov 12 20:05 private
drwx------ 2 web19 client1 4096 Nov 12 15:09 .ssh
drwxr-xr-x 2 root root 4096 Nov 12 14:55 ssl
drwxrwx--- 2 web19 client1 4096 Nov 12 20:09 tmp
drwxr-xr-x 8 root root 4096 Nov 12 15:09 usr
drwxr-xr-x 4 root root 4096 Nov 12 15:12 var
drwx--x--x 14 web19 client1 4096 Nov 12 20:09 web
drwx--x--- 2 web19 client1 4096 Nov 12 14:50 webdav发布于 2022-03-17 13:34:50
我和您有同样的问题,奇怪的是,我使用相同的用户/客户端进行相同的服务。我已经以以下方式进行了解决(除了您关于“locale”的解决方案之外)。
进入监狱根(/var/www/clients/client1/web19)。这里创建包含PHP内容的目录:
mkdir -p etc/php/7.4/cli/conf.d将用于cli的全系统php.ini复制到监狱:
cp -a /etc/php/7.4/cli/php.ini etc/php/7.4/cli/php.ini“很难”将系统范围内的所有*.so文件链接到监狱。例如:
ln /etc/php/7.4/mods-available/apcu.ini 20-apcu.ini如果您也有缓存问题(就像我一样),可以在运行occ之前添加一个定义。我使用以下命令:
runuser -l web19 -c "cd /web; php --define apc.enable_cli=1 ./occ"...and似乎都很好!:-)
https://stackoverflow.com/questions/69953976
复制相似问题