Nextcloud:无法打开流:权限被拒绝

Nextcloud:无法打开流:权限被拒绝

我正在 FreeBSD 系统上安装 Nextcloud,并使用带有终端 SSL 的反向代理lighttpdnginx

lighttpd能够提供静态html文件,也可以提供index.php,但没有任何样式,只有文本。

lighttpd -D -f /usr/local/etc/lighttpd/lighttpd.conf运行访问的时候cloud2.myhostname.com出现如下图所示的一堆错误。

文档根目录及其所有后代均归 所拥有,即 所运行的www:www用户和组。所有目录均具有 的权限。所有文件均具有 的权限。lighttpd770660

错误lighttpd日志显示 FastCGI 正在运行,并且 FastCGI 正在返回错误跟踪,该lighttpd日志记录为 ,FastCGI-stderr:表明错误跟踪来自它。

如何解决这个问题?

server.c.1513) server started (lighttpd/1.4.59)
gw_backend.c.944) gw - found a host  0
gw_backend.c.944) gw - found a host  0
gw_backend.c.228) got proc: pid: 99023 socket: unix:/var/run/lighttpd/sockets/php.socket-2 load: 1
mod_fastcgi.c.487) FastCGI-stderr:{"reqId":"5HVsZcmvRCF7Qpm918A6","level":3,"time":"2021-10-25T22:03:55+00:00","remoteAddr":"111.222.33.44","user":"--","app":"PHP","method":"GET","url":"/index.php","message":"file_put_contents(/usr/local/www/nextcloud/data/.htaccess): Failed to open stream: Permission denied at /usr/local/www/nextcloud/lib/private/Setup.php#584","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:93.0) Gecko/20100101 Firefox/93.0","version":"","exception":{"Exception":"Error","Message":"file_put_contents(/usr/local/www/nextcloud/data/.htaccess): Failed to open stream: Permission denied at /usr/local/www/nextcloud/lib/private/Setup.php#584","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/usr/local/www/nextcloud/lib/private/Setup.php","line":584,"function":"file_put_contents"},{"file":"/usr/local/www/nextcloud/lib/private/Setup.php","line":222,"function":"protectDataDirectory","class":"OC\\Setup","type":"::"},{"file":"/usr/local/www/nextcloud/core/Controller/SetupController.php","line":57,"function":"getSystemInfo","class":"OC\\Setup","type":"->"},{"file":"/usr/local/www/nextcloud/lib/base.php","line":939,"function":"run","class":"OC\\Core\\Controller\\SetupController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/usr/local/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}

mod_fastcgi.c.487) FastCGI-stderr:{"reqId":"5HVsZcmvRCF7Qpm918A6","level":3,"time":"2021-10-25T22:03:55+00:00","remoteAddr":"111.222.33.44","user":"--","app":"PHP","method":"GET","url":"/index.php","message":"file_put_contents(/usr/local/www/nextcloud/data/index.html): Failed to open stream: Permission denied at /usr/local/www/nextcloud/lib/private/Setup.php#585","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:93.0) Gecko/20100101 Firefox/93.0","version":"","exception":{"Exception":"Error","Message":"file_put_contents(/usr/local/www/nextcloud/data/index.html): Failed to open stream: Permission denied at /usr/local/www/nextcloud/lib/private/Setup.php#585","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/usr/local/www/nextcloud/lib/private/Setup.php","line":585,"function":"file_put_contents"},{"file":"/usr/local/www/nextcloud/lib/private/Setup.php","line":222,"function":"protectDataDirectory","class":"OC\\Setup","type":"::"},{"file":"/usr/local/www/nextcloud/core/Controller/SetupController.php","line":57,"function":"getSystemInfo","class":"OC\\Setup","type":"->"},{"file":"/usr/local/www/nextcloud/lib/base.php","line":939,"function":"run","class":"OC\\Core\\Controller\\SetupController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/usr/local/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}

mod_fastcgi.c.487) FastCGI-stderr:{"reqId":"5HVsZcmvRCF7Qpm918A6","level":2,"time":"2021-10-25T22:03:55+00:00","remoteAddr":"111.222.33.44","user":"--","app":"no app in context","method":"GET","url":"/index.php","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:93.0) Gecko/20100101 Firefox/93.0","version":""}

mod_fastcgi.c.487) FastCGI-stderr:{"reqId":"5HVsZcmvRCF7Qpm918A6","level":2,"time":"2021-10-25T22:03:55+00:00","remoteAddr":"111.222.33.44","user":"--","app":"no app in context","method":"GET","url":"/index.php","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:93.0) Gecko/20100101 Firefox/93.0","version":""}

mod_fastcgi.c.487) FastCGI-stderr:{"reqId":"5HVsZcmvRCF7Qpm918A6","level":3,"time":"2021-10-25T22:03:55+00:00","remoteAddr":"111.222.33.44","user":"--","app":"PHP","method":"GET","url":"/index.php","message":"fopen(/var/log/nextcloud/nextcloud.log): Failed to open stream: Permission denied at /usr/local/www/nextcloud/lib/private/Log/File.php#84","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:93.0) Gecko/20100101 Firefox/93.0","version":""}

gw_backend.c.303) released proc: pid: 99023 socket: unix:/var/run/lighttpd/sockets/php.socket-2 load: 0

答案1

原来,在 中modules.conflighttpd我忘记包含文件conf.d/fastcgi.conf。只需取消注释该行即可。

相关内容