[010]开启Nextcloud的服务端加密功能

本来,可以通过Nextcloud后台直接开启服务端加密。然而,16.0.3版本的Nextcloud似乎存在BUG,导致无法通过API开启服务端加密。无奈,才用命令行开启Nextcloud的服务端加密功能。

获取当前加密功能状态和加密模块情况:

occ encryption:status

得到下面的输出:

 - enabled: false
 - defaultModule: OC_DEFAULT_MODULE

开启服务端加密:

occ encryption:enable

这时,再去Nextcloud后台,可以看见服务端加密功能已被开启。

但是,已经上传的文件此时还是未加密的,Nextcloud只会加密以后上传的文件。

如果要加密所有文件,需要在保证无文件改动的情况下,执行下面的命令:

occ encryption:encrypt-all

得到下面的返回:

You are about to encrypt all files stored in your Nextcloud installation.
Depending on the number of available files, and their size, this may take quite some time.
Please ensure that no user accesses their files during this time!
Note: The encryption module you use determines which files get encrypted.

Do you really want to continue? (y/n)

需要输入y确认开启加密。

References

Encryption configuration. (2019, January 10). Retrieved July 20, 2019, from Nextcloud latest Administration Manual latest documentation: https://docs.nextcloud.com/server/16/admin_manual/configuration_files/encryption_configuration.html

Nextcloud 加密功能的配置. (2018, February 15). Retrieved July 20, 2019 from 橙叶博客: https://www.orgleaf.com/3077.html

作者:Raaynk
链接:https://www.raaynk.com/archives/010-enable-nextcloud-encryption.html
来源:Raaynk's Blog

著作权归作者所有。商业性使用请联系作者获得授权。非商业性使用请注明链接及出处。

知识共享许可协议
本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。

Author: Raaynk
Link: https://www.raaynk.com/archives/010-enable-nextcloud-encryption.html
Source: Raaynk's Blog

Copyright is owned by the author. For Commercial use, please contact the author for authorization. For Non-Commercial use, please indicate the link and the source.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

发表评论

电子邮件地址不会被公开。 必填项已用*标注