Nextcloud/OwnCloud管理页面上的警告及对应方案

2,313次阅读
没有评论

Nextcloud/OwnCloud 内置了配置检查工具,错误信息会被显示在管理页面的顶端。本文列举了一些可能会看到的警告及其解决方案。

Nextcloud/OwnCloud管理页面上的警告及对应方案

您可以使用 Nextcloud Security Scan 查看您的系统是否是最新的并且是否安全。过去,我们已经对公共 IP 地址进行了扫描,尝试接触到非常过时的系统,并可能在将来再次出现。请保护您的隐私,并保持您的服务器最新!隐私意味着没有安全性。

缓存警告

如果没有配置内存缓存,就会看到以下提示:

No memory cache has been configured. To enhance your performance please configure a memcache if available.

或者是

内存缓存未配置,如果可用,请配置 memcache 来增强性能。

ownCloud/Nextcloud 支持以下几种内存缓存方式:

  • APCu (PHP4.0.6+)
  • Memcached
  • Redis (PHP2.2.6+)

相关教程

APCu:VPS 配置 ownCloud_memcache【APCu】Nextcloud/ownCloud 配置 APCu 本地缓存+Memcached 分布式缓存

Memcache:ownCloud 配置 memcacheNextcloud/ownCloud 配置 APCu 本地缓存+Memcached 分布式缓存

Redis:【ownCloud】配置 Redis 内存缓存

其它警告

{Cache} below version {Version} is installed. for stability and performance reasons we recommend to update to a newer {Cache} version” then you need to upgrade, or, if you’re not using it, remove it.

注:{Cache}至内存缓存方式,{Version}为相应版本

如果你所安装的版本太低或没有安装和启用缓存,就会看到以上警告。可以通过升级版本或彻底删除缓存工具的方式来解决。

Transactional file locking is disabled

Transactional file locking is disabled, this might lead to issues with race conditions.

这是事务文件锁定功能被禁用的缘故。

Nextcloud 的事务文件锁定机制能够锁定文件以避免在正常操作期间文件损坏。更多信息可以查看:Transactional File Locking

建议使用 HTTPS

如果使用 HTTP 协议访问 Nextcloud/OwnCloud,就会看到以下警告

You are accessing this site via HTTP

或者是

您正在通过 HTTP 访问该站点,我们强烈建议您按照安全提示配置服务器强制使用 HTTPS

HTTPS 是大势所趋,更何况是牵涉文件安全的网页应用。如果你的 Nextcloud/Owncloud 在外网上跑,使用 HTTPS 是相当有必要的,而且如果不使用 HTTP,就会有部分功能受到限制。

Nextcloud/OwnCloud管理页面上的警告及对应方案

如果未使用 HTTPS,在使用一些插件时也会显示警告

以下是一些开启 HTTPS 的教程:

The test with getenv(“PATH”) only returns an empty response

某些环境没有将有效的 PATH 变量传递给 Nextcloud。 可以阅读php-fpm 配置注意事项

解决方法:The test with getenv(“PATH”) only returns an empty response 报错解决办法

“Strict-Transport-Security(HSTS)”HTTP 头没有配置

开启 HTTPS 后,会出现这个提示

The “Strict-Transport-Security” HTTP header is not configured to least “15552000” seconds. For enhanced security we recommend enabling HSTS as described in our security tips.

错误在于虽然开启了 HTTPS,却使用传统 301 方式跳转或没有进行强制跳转。

HSTS(HTTP Strict Transport Security)国际互联网工程组织 IETE 正在推行一种新的 Web 安全协议。HSTS 的作用是强制客户端(如浏览器)使用 HTTPS 与服务器创建连接。不同于传统 301 跳转,HSTS 不会在跳转过程遭遇网络渗透。

有关 HSTS 的设置可以参考官方文档:Enable HTTP Strict Transport Security,我也会在以后发布相关中文教程。

/dev/urandom is not readable by PHP

/dev/urandom is not readable by PHP which is highly discouraged for security reasons. Further information can be found in our documentation.

错误原因在于 PHP 无法读取/dev/urandom。这是个严重的问题,可以参考官方文档: Give PHP read access to /dev/urandom

Your Web server is not yet set up properly to allow file synchronization

“Your web server is not yet set up properly to allow file synchronization because the WebDAV interface seems to be broken.”

有关这个问题,在 ownCloud 官方论坛有详细说明:How to fix CalDAV|CardDAV|WebDAV problems

Outdated NSS / OpenSSL version

“cURL is using an outdated OpenSSL version (OpenSSL/$version). Please update your operating system or features such as installing and updating apps via the app store or Federated Cloud Sharing will not work reliably.”“cURL is using an outdated NSS version (NSS/$version). Please update your operating system or features such as installing and updating apps via the app store or Federated Cloud Sharing will not work reliably.”

早期的 OpenSSL 和 NSS 版本中存在 BUG,导致与使用 SNI 的远程主机相连接的方式不正确。解决这个问题需要将 OpenSSL 至少升级为 1.0.2b 或 1.0.1d。

对于 RHEL / CentOS,这个问题尚未解决,该 BUG 报告页面:Certificate verification fails with multiple https urls [el7/nss]

Your Web server is not set up properly to resolve /.well-known/caldav/ or /.well-known/carddav/

错误原因:/.well-known/caldav/和 /.well-known/carddav/没有正确地重定向到 Nextcloud 的 DAV 端点

有关这个问题,可以参考官方文档:Service discovery

文件完整性检查

这是一个很常见的错误,一般提示为:

Some files have not passed the integrity check

某些文件尚未通过完整性检查

出现这个错误的往往是因为文件缺失、多余。注意:

请不要在 Nextcloud/OwnCloud 程序目录下放置任何其他文件,否则会提示这个错误

往往还会有下面的提示信息:

Nextcloud/OwnCloud管理页面上的警告及对应方案

对于强迫症患者,可以考虑删掉整个程序,重新下载安装。有耐心者可以按照下面的过程查找核对错误文件:Nextcloud/OwnCloud管理页面上的警告及对应方案

点击”List of invalid files…”查看错误文件列表,你可能看到下面的信息(已标注处理方法):

Your database does not run with “READ COMMITED” transaction isolation level

“Your database does not run with “READ COMMITED” transaction isolation level. This can cause problems when multiple actions are executed in parallel.”

有关这个问题,可以查看官方文档: Database “READ COMMITED” transaction isolation level 来了解如何设置数据库。

 
吾爱互联
版权声明:本站原创文章,由 吾爱互联 2020-01-05发表,共计6444字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(没有评论)
载入中...