nextcloud 在重启后重写配置权限

nextcloud 在重启后重写配置权限

嘿嘿!

我正在努力解决 nextcloud 实例上的权限问题。

我的设置是

  • Manjaro 21.0.7-210614 linux518
  • Nextcloud 24.0.3-1
  • Apache 2.4.54-1
  • php-sqlite 8.1.8-1
  • php 国际 8.1.8-1
  • php-imagick 3.7.0-2
  • php-gd 8.1.8-1
  • php-apcu 5.1.21-3
  • php-apache 8.1.8-1
  • php 8.1.8-1

我的配置文件夹不断重写它的权限,结果我每天都会收到错误:

Cannot write into "config" directory!
This can usually be fixed by giving the web server write access to the config directory. 
But, if you prefer to keep config.php 
file read only, set the option "config_is_read_only" to true in it.
See https://docs.nextcloud.com/server/24/go.php?to=admin-config

每天我的权限都是这样的:

   /usr/sh/we/ne/config  cls -la                                                         INT ✘  root@cloud 
  rwxrwxr-x   1   nextcloud   nextcloud     94 B     Sat Aug  6 11:10:29 2022    ./
  rwxr-xr-x   1   root        root          30 B     Sat Aug  6 11:10:29 2022    ../
  rwxrwxr-x   1   nextcloud   nextcloud      0 B     Tue Jul 19 21:28:06 2022    CAN_INSTALL 
  rwxrwxr-x   1   nextcloud   nextcloud      1 KiB   Sat Aug  6 10:59:43 2022    config.php 
  rwxrwxr-x   1   nextcloud   nextcloud     66 KiB   Tue Jul 19 21:28:06 2022    config.sample.php 
  rwxrwxr-x   1   nextcloud   nextcloud    495 B     Tue Jul 19 21:28:06 2022    .htaccess 

我必须重写它们才能使 nextcloud 正常工作:

   /usr/sh/we/nextcloud/config  cls -la                                                      ✔  root@cloud
  rwxrwxr-x   1   nextcloud   http     94 B     Sat Aug  6 11:10:29 2022    ./
  rwxr-xr-x   1   root        root     30 B     Sat Aug  6 11:10:29 2022    ../
  rwxrwxr-x   1   nextcloud   http      0 B     Tue Jul 19 21:28:06 2022    CAN_INSTALL 
  rwxrwxr-x   1   nextcloud   http      1 KiB   Sat Aug  6 10:59:43 2022    config.php 
  rwxrwxr-x   1   nextcloud   http     66 KiB   Tue Jul 19 21:28:06 2022    config.sample.php 
  rwxrwxr-x   1   nextcloud   http    495 B     Tue Jul 19 21:28:06 2022    .htaccess 

用户 nextcloud 不属于组 http!

奇怪的是,更改符号链接不会影响 /etc/webapps/nextcloud 中的权限。我必须进入该文件夹并手动更改它们。

这是什么奇怪的行为?我如何让 nextcloud 保留我的权限?

答案1

似乎唯一的解决方案是将 webserver-user 添加到 nextcloud 组......

usermod -a -G nextcloud http

相关内容