ERROR : scss_cacher OCP\Files\ NotPermittedException:

With the risk of duplicating an already existing thread I will explain my issue with you in order to find a solution. I’ve done some research but the simillar threads seems to not solve my issue.

I have my instance of NC running for few months already but 1 thing has been always disturbing me and I think it is about time to solve that issue. → I see multiple scss_cacher OCP\Files\NotPermittedException: errors everytime I open the NC logging and I don’t know how to fix it. It seems to not crash the NC instance and has no obvious signs of the error, but I believe it will work more smoth after clearing the cause of this error (If i only knew it )

here is the whole error text. I will be happy if somebody help me solve this! :slight_smile:

/var/www/nextcloud/lib/private/Files/SimpleFS/SimpleFile.php - line 149:
OC\Files\Node\File->delete()
/var/www/nextcloud/lib/private/Template/SCSSCacher.php - line 386:
OC\Files\SimpleFS\SimpleFile->delete()
/var/www/nextcloud/lib/private/Template/SCSSCacher.php - line 278:
OC\Template\SCSSCacher->resetCache()
/var/www/nextcloud/lib/private/Template/SCSSCacher.php - line 142:
OC\Template\SCSSCacher->variablesChanged()
/var/www/nextcloud/lib/private/Template/CSSResourceLocator.php - line 109:
OC\Template\SCSSCacher->process()
/var/www/nextcloud/lib/private/Template/CSSResourceLocator.php - line 61:
OC\Template\CSSResourceLocator->cacheAndAppendScssIfExist()
/var/www/nextcloud/lib/private/Template/ResourceLocator.php - line 78:
OC\Template\CSSResourceLocator->doFind()
/var/www/nextcloud/lib/private/TemplateLayout.php - line 342:
OC\Template\ResourceLocator->find()
/var/www/nextcloud/lib/private/TemplateLayout.php - line 250:
OC\TemplateLayout::findStylesheetFiles()
/var/www/nextcloud/lib/private/legacy/OC_Template.php - line 185:
OC\TemplateLayout->__construct()
/var/www/nextcloud/lib/public/AppFramework/Http/TemplateResponse.php - line 204:
OC_Template->fetchPage()
/var/www/nextcloud/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php - line 154:
OCP\AppFramework\Http\TemplateResponse->render()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 178:
OCP\AppFramework\Http\Template\PublicTemplateResponse->render()
/var/www/nextcloud/lib/private/AppFramework/App.php - line 172:
OC\AppFramework\Http\Dispatcher->dispatch()
/var/www/nextcloud/lib/private/Route/Router.php - line 298:
OC\AppFramework\App::main()
/var/www/nextcloud/lib/base.php - line 1023:
OC\Route\Router->match()
/var/www/nextcloud/index.php - line 36:
OC::handleRequest()

Hi all,
I am running latest version of nextcloud and have exactly the same problem.
It would be nice if somebody can help to solve this.

Hi, MiHoe!
Thank you for joining my thread. Hope we find a proper solution! :slight_smile:

I managed to narrow down the issue, but still can’t get a solution. Will be very thankfull if somebody can help me with the new details provided.

After investigating the log file deeply, I filtered all logs and to this one:

"app":"scss_cacher","method":"","url":"--","message":"SCSSCacher::resetCache unable to delete file: 5031-8017-unified-search.css.gzip","userAgent":"--","version":"24.0.4.1",
"exception":{"Exception":"OCP\\Files\\NotPermittedException","Message":"","Code":0,
["/var/www/nextcloud/console.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Files/Node/File.php","Line":137,
"message":"SCSSCacher::resetCache unable to delete file: 5031-8017-unified-search.css.gzip","exception":{},
"CustomMessage":"SCSSCacher::resetCache unable to delete file: 5031-8017-unified-search.css.gzip"}}

The file 5031-8017-unified-search.css.gzip is in the following path
/var/www/nextcloud/data/appdata_/css/spreed

after

ls -l
in this path, I can see that all files have read and write permissions for the nextcloud user:

-rw-rw-rw- 1 www-data www-data

While the Spreed directory itself has the following permissions

drwxrwxrwx 2 www-data www-data

I actually tried to change a few setting in order to clear this issue, but had no success. So the question remains - Why the php script has no permission to delete the files? Am I wrong somewhere about the permission setting (I admit I don’t understand them very deeply) or it might be a non-permission problem at all?

Thank in advance!