nextcloud/previewgenerator

OCP\Files\NotPermittedException: Could not create folder

AndyXheli opened this issue · 4 comments

Nextcloud 27.1.1

App Version 5.3.0

{"reqId":"vCSnsB4a1rJGGcirP94I","level":3,"time":"2023-10-04T10:57:46-05:00","remoteAddr":"1.0.0.2","user":"xxxx","app":"index","method":"GET","url":"/apps/photos/api/v1/preview/636520?etag=f9f1277d1f1622ad879fe0cde4767b45&x=64&y=64","message":"Could not create folder \"/appdata_oc368e1f50dl/preview/4/d/8/1/3/f/7/636520\"","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36","version":"27.1.1.0","exception":{"Exception":"OCP\\Files\\NotPermittedException","Message":"Could not create folder \"/appdata_oc368e1f50dl/preview/4/d/8/1/3/f/7/636520\"","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Files/AppData/AppData.php","line":147,"function":"newFolder","class":"OC\\Files\\Node\\Folder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Preview/Storage/Root.php","line":74,"function":"newFolder","class":"OC\\Files\\AppData\\AppData","type":"->"},{"file":"/var/www/nextcloud/lib/private/Preview/Generator.php","line":643,"function":"newFolder","class":"OC\\Preview\\Storage\\Root","type":"->"},{"file":"/var/www/nextcloud/lib/private/Preview/Generator.php","line":139,"function":"getPreviewFolder","class":"OC\\Preview\\Generator","type":"->"},{"file":"/var/www/nextcloud/lib/private/Preview/Generator.php","line":116,"function":"generatePreviews","class":"OC\\Preview\\Generator","type":"->"},{"file":"/var/www/nextcloud/lib/private/PreviewManager.php","line":192,"function":"getPreview","class":"OC\\Preview\\Generator","type":"->"},{"file":"/var/www/nextcloud/apps/photos/lib/Controller/PreviewController.php","line":162,"function":"getPreview","class":"OC\\PreviewManager","type":"->"},{"file":"/var/www/nextcloud/apps/photos/lib/Controller/PreviewController.php","line":128,"function":"fetchPreview","class":"OCA\\Photos\\Controller\\PreviewController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"index","class":"OCA\\Photos\\Controller\\PreviewController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1068,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Files/Node/Folder.php","Line":162,"CustomMessage":"--"},"id":"651d8d1b292dd"}

Also happen on photos.
nextcloud/photos#1498

I'm having the same issue. Brand new install of NextCloud AIO. I uploaded about 100GB of photos. Whenever I click on the "Photos" link, NextCloud freezes completely. I have to restart the NextCloud container.

This is what I'm seeing in the logs.

OCP\Files\NotPermittedException: Could not create folder "/appdata_ocpq51zbx1fh/preview/5/d/a/0/4/d/6/34800"

When I disable the Photos app, the problem goes away. I've read through multiple threads online, there doesn't seem to be a solution to this.

This issue also happens on my instance which is on Nextcloud 25.0.12.

NC v27.1.5.1, same.

[index] Fehler: OCP\Files\NotPermittedException: Could not create folder "/appdata_ocXXXXXXXXXX/preview/0/1/3/2/c/e/5/170327" at <<closure>>

 0. /var/www/nextcloud/lib/private/Files/AppData/AppData.php line 147
    OC\Files\Node\Folder->newFolder()
 1. /var/www/nextcloud/lib/private/Preview/Storage/Root.php line 74
    OC\Files\AppData\AppData->newFolder()
 2. /var/www/nextcloud/lib/private/Preview/Generator.php line 613
    OC\Preview\Storage\Root->newFolder()
 3. /var/www/nextcloud/lib/private/Preview/Generator.php line 139
    OC\Preview\Generator->getPreviewFolder()
 4. /var/www/nextcloud/lib/private/Preview/Generator.php line 116
    OC\Preview\Generator->generatePreviews()
 5. /var/www/nextcloud/lib/private/PreviewManager.php line 192
    OC\Preview\Generator->getPreview()
 6. /var/www/nextcloud/core/Controller/PreviewController.php line 144
    OC\PreviewManager->getPreview()
 7. /var/www/nextcloud/core/Controller/PreviewController.php line 113
    OC\Core\Controller\PreviewController->fetchPreview()
 8. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
    OC\Core\Controller\PreviewController->getPreviewByFileId()
 9. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController()
10. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
11. /var/www/nextcloud/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
12. /var/www/nextcloud/lib/base.php line 1068
    OC\Route\Router->match()
13. /var/www/nextcloud/index.php line 38
    OC::handleRequest()

GET /index.phpiew?x=256&y=256&fileId=170327&c=9c23a298484fc79eedeb5442df43d447
from XXX.XXX.XXX.XXX by Username at 2024-01-28T17:46:08+01:00

Related: #289