You are not logged in.

#1 2021-05-12 18:50:54

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Nextcloud server Files app is not accessible

Hi, I have posted in the other long thread, but there is no solution available to my issue:

When I try accessing the Files app -- all I get is an internal Server Error with a Request Id. When I look for that request ID in the logs, I see :

{"reqId":"A70oHmqsM5FphxfbgVzk","level":3,"time":"2021-05-12T13:30:50-05:00","remoteAddr":"172.16.5.51","user":"murtuza","app":"index","method":"GET","url":"/apps/fil
     es/","message":{"Exception":"ScssPhp\\ScssPhp\\Exception\\CompilerException","Message":"`../../../core/css/whatsnew.scss` file not found for @import: /var/lib/nextclo
     ud/apps/files/css/merged.scss on line 5, at column 1\nCall Stack:\n#0 import /var/lib/nextcloud/apps/files/css/merged.scss (unknown file) on line 1","Code":0,"Trace":
     [{"file":"/usr/share/webapps/nextcloud/3rdparty/scssphp/scssphp/src/Compiler.php","line":5377,"function":"error","class":"ScssPhp\\ScssPhp\\Compiler","type":"->"},{"f
     ile":"/usr/share/webapps/nextcloud/3rdparty/scssphp/scssphp/src/Compiler.php","line":2475,"function":"findImport","class":"ScssPhp\\ScssPhp\\Compiler","type":"->"},{"
     file":"/usr/share/webapps/nextcloud/3rdparty/scssphp/scssphp/src/Compiler.php","line":2688,"function":"compileImport","class":"ScssPhp\\ScssPhp\\Compiler","type":"->"
     },{"file":"/usr/share/webapps/nextcloud/3rdparty/scssphp/scssphp/src/Compiler.php","line":2154,"function":"compileChild","class":"ScssPhp\\ScssPhp\\Compiler","type":"
     ->"},{"file":"/usr/share/webapps/nextcloud/3rdparty/scssphp/scssphp/src/Compiler.php","line":5306,"function":"compileChildrenNoReturn","class":"ScssPhp\\ScssPhp\\Comp
     iler","type":"->"},{"file":"/usr/share/webapps/nextcloud/3rdparty/scssphp/scssphp/src/Compiler.php","line":2477,"function":"importFile","class":"ScssPhp\\ScssPhp\\Com
     piler","type":"->"},{"file":"/usr/share/webapps/nextcloud/3rdparty/scssphp/scssphp/src/Compiler.php","line":2688,"function":"compileImport","class":"ScssPhp\\ScssPhp\
     \Compiler","type":"->"},{"file":"/usr/share/webapps/nextcloud/3rdparty/scssphp/scssphp/src/Compiler.php","line":2154,"function":"compileChild","class":"ScssPhp\\ScssP
     hp\\Compiler","type":"->"},{"file":"/usr/share/webapps/nextcloud/3rdparty/scssphp/scssphp/src/Compiler.php","line":570,"function":"compileChildrenNoReturn","class":"S
     cssPhp\\ScssPhp\\Compiler","type":"->"},{"file":"/usr/share/webapps/nextcloud/3rdparty/scssphp/scssphp/src/Compiler.php","line":401,"function":"compileRoot","class":"
     ScssPhp\\ScssPhp\\Compiler","type":"->"},{"file":"/usr/share/webapps/nextcloud/lib/private/Template/SCSSCacher.php","line":343,"function":"compile","class":"ScssPhp\\
     ScssPhp\\Compiler","type":"->"},{"file":"/usr/share/webapps/nextcloud/lib/private/Template/SCSSCacher.php","line":189,"function":"cache","class":"OC\\Template\\SCSSCa
     cher","type":"->"},{"file":"/usr/share/webapps/nextcloud/lib/private/Template/CSSResourceLocator.php","line":111,"function":"process","class":"OC\\Template\\SCSSCache
     r","type":"->"},{"file":"/usr/share/webapps/nextcloud/lib/private/Template/CSSResourceLocator.php","line":86,"function":"cacheAndAppendScssIfExist","class":"OC\\Templ
     ate\\CSSResourceLocator","type":"->"},{"file":"/usr/share/webapps/nextcloud/lib/private/Template/ResourceLocator.php","line":79,"function":"doFind","class":"OC\\Templ
     ate\\CSSResourceLocator","type":"->"},{"file":"/usr/share/webapps/nextcloud/lib/private/TemplateLayout.php","line":330,"function":"find","class":"OC\\Template\\Resour
     ceLocator","type":"->"},{"file":"/usr/share/webapps/nextcloud/lib/private/TemplateLayout.php","line":238,"function":"findStylesheetFiles","class":"OC\\TemplateLayout"
     ,"type":"::"},{"file":"/usr/share/webapps/nextcloud/lib/private/legacy/OC_Template.php","line":183,"function":"__construct","class":"OC\\TemplateLayout","type":"->"},
     {"file":"/usr/share/webapps/nextcloud/lib/public/AppFramework/Http/TemplateResponse.php","line":210,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":
     "/usr/share/webapps/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":172,"function":"render","class":"OCP\\AppFramework\\Http\\TemplateResponse","type":
     "->"},{"file":"/usr/share/webapps/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->
     "},{"file":"/usr/share/webapps/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/usr/share/w
     ebapps/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/usr/share/webapps/nextcloud/index.php","line":37,"func
     tion":"handleRequest","class":"OC","type":"::"}],"File":"/usr/share/webapps/nextcloud/3rdparty/scssphp/scssphp/src/Compiler.php","Line":5602,"CustomMessage":"--"},"us
     erAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36","version":"21.0.1.1"}

I saw this bug report where David indicates that the default apps should not be copied over to the writable apps directory. However when I don't copy over the apps, all I get is ERR_TOO_MANY_REDIRECTS as the request for each and every app keeps redirecting between /usr/share/webapps/nextcloud/apps to /var/lib/nextcloud/apps and my Nextcloud WebUI doesn't even show up. Once I copy over the apps, I am able to get into the WebUI --- but trying to access the files leads me to an Internal Server error with a Request ID.

I tried to change the /usr/share/webapps/nextcloud/apps directory into a link to the /var/lib/nextcloud/apps -- but that didn't help at all. My directory ownership for all nextcloud related folders is as follows:

- Nextcloud root /usr/share/webapps/nextcloud      root:root
- Nextcloud apps  /var/lib/nextcloud/apps               nextcloud:nextcloud
- Nextcloud data  /mnt/freenas/nextcloud/              nextcloud:nextcloud
- Nextcloud config  /etc/webapps/nextcloud/config nextcloud:nextcloud
- Nextcloud apps root/apps not writable
- Nextcloud wapps root/wapps -> /var/lib/nextcloud/apps writable
- Nginx upstream php-handler {server unix:/run/nextcloud/nextcloud.sock;}

Here's my nextcloud.conf for php-fpm

[nextcloud]
user = nextcloud
group = nextcloud
listen = /run/nextcloud/nextcloud.sock
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp

; should be accessible by your web server
listen.owner = http
listen.group = http

pm = dynamic
pm.max_children = 15
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3

How would I fix this?

Last edited by Inxsible (2021-05-13 15:00:06)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#2 2021-05-13 19:26:49

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Nextcloud server Files app is not accessible

I ended up changing the ownership back to the http user on all the relevant folders. Everything works as expected now. This works for me because I have my nextcloud served from a Proxmox container. So I am never going to have anything other than nextcloud served by the same nginx server.

The only catch is that when I upgrade/re-install nextcloud from the community repository -- it changes the ownership back to nextcloud:nextcloud which leads to the failure of the nextcloud.hook for pacman. So in case I do re-install or upgrade in the future, I will have to manually change the ownership back to http:http and then issue the following command manually

sudo -u http php occ upgrade

Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

Board footer

Powered by FluxBB